[ABD] 4S-BB-Control - v.1.0.0

Any abandoned MODs will be moved to this forum.

WARNING: MODs in this forum are not currently being supported or maintained by the original MOD author. Proceed at your own risk.
Forum rules
IMPORTANT: MOD Development Forum rules

WARNING: MODs in this forum are not currently being supported nor updated by the original MOD author. Proceed at your own risk.
Locked
chicken_chicken
Registered User
Posts: 46
Joined: Wed Jun 27, 2007 5:20 pm

Re: [BETA] Hide Content 4 Groups - v.0.0.8.d

Post by chicken_chicken » Sat Nov 01, 2008 10:16 pm

Is it possible with this MOD that all can SEE bbcodes, but not everbody can USE them in their posts?

So only admins can use bb codes, but everybody can see them?

User avatar
4_seven
I've Been Banned!
Posts: 5155
Joined: Wed Apr 30, 2008 1:41 am

Re: [BETA] Hide Content 4 Groups - v.0.0.8.d

Post by 4_seven » Sun Nov 02, 2008 12:20 am

Current Mods | Mod Base | php(BB) programming | No help via PM

User avatar
4_seven
I've Been Banned!
Posts: 5155
Joined: Wed Apr 30, 2008 1:41 am

Fix > v.0.0.8.e

Post by 4_seven » Sun Nov 02, 2008 4:14 am

Fix > v.0.0.8.e

Ok, i figured it out and (i hope) i fixed the not-hidden@search-bug:

to update from v.0.0.8.d do the following:

- download the new package v.0.0.8.e from first post
- copy new file version of root/includes/functions_hide_content.php > includes/functions_hide_content.php
- copy new file root/includes/functions_hide_post_search.php > includes/functions_hide_post_search.php

- than...

open search.php

find

Code: Select all

				// We pre-process some variables here for later usage

                               // $row['post_text'] = censor_text($row['post_text']);
replace with

Code: Select all

				// We pre-process some variables here for later usage
				
                // 4seven // $row['post_text'] = censor_text($row['post_text']);
                include($phpbb_root_path . 'includes/functions_hide_content.' . $phpEx);
			    $row['post_text'] = preg_replace($search_pattern_hc, $pattern_replacement_hc, $target_source_hc_2);
                // 4seven 
find

Code: Select all

				$tpl_ary = array(
					'POST_AUTHOR_FULL'		=> get_username_string('full', $row['poster_id'], $row['username'], $row['user_colour'], $row['post_username']),
					'POST_AUTHOR_COLOUR'	=> get_username_string('colour', $row['poster_id'], $row['username'], $row['user_colour'], $row['post_username']),
					'POST_AUTHOR'			=> get_username_string('username', $row['poster_id'], $row['username'], $row['user_colour'], $row['post_username']),
					'U_POST_AUTHOR'		    => get_username_string('profile', $row['poster_id'], $row['username'], $row['user_colour'], $row['post_username']),

					'POST_SUBJECT'		    => $row['post_subject'],
					'POST_DATE'			    => (!empty($row['post_time'])) ? $user->format_date($row['post_time']) : '',
					'MESSAGE'			    => $row['post_text']
					
				);
replace with

Code: Select all

                // 4seven
                include($phpbb_root_path . 'includes/functions_hide_post_search.' . $phpEx);
                // 4seven
                /*
				$tpl_ary = array(
					'POST_AUTHOR_FULL'		=> get_username_string('full', $row['poster_id'], $row['username'], $row['user_colour'], $row['post_username']),
					'POST_AUTHOR_COLOUR'	=> get_username_string('colour', $row['poster_id'], $row['username'], $row['user_colour'], $row['post_username']),
					'POST_AUTHOR'			=> get_username_string('username', $row['poster_id'], $row['username'], $row['user_colour'], $row['post_username']),
					'U_POST_AUTHOR'		    => get_username_string('profile', $row['poster_id'], $row['username'], $row['user_colour'], $row['post_username']),

					'POST_SUBJECT'		    => $row['post_subject'],
					'POST_DATE'			    => (!empty($row['post_time'])) ? $user->format_date($row['post_time']) : '',
					'MESSAGE'			    => $row['post_text']
					
				);	
                */         
- clear all caches
- that's it

Please report all bugs

regards
4seven
Current Mods | Mod Base | php(BB) programming | No help via PM

User avatar
eman80
Registered User
Posts: 327
Joined: Tue Aug 19, 2008 1:49 pm

Re: [BETA] Hide Content 4 Groups - v.0.0.8.e

Post by eman80 » Sun Nov 02, 2008 12:59 pm

It seems everything works fine after updating

Thank you very much :)

Regards.
welcome to my forum:
http://www.elibrary4arab.com

User avatar
4_seven
I've Been Banned!
Posts: 5155
Joined: Wed Apr 30, 2008 1:41 am

Re: [BETA] Hide Content 4 Groups - v.0.0.8.e

Post by 4_seven » Sun Nov 02, 2008 6:09 pm

Important Notice

fu** - found a bug, was coming up by searching for words that be in hidden-bbcode and hidden-bbcode-post too. bbcode was complety hidden and everything is fine, but the mixed-search-summery show hidden-bbcode-post :roll: this is a rare constellation, but i want to make my mod perfect. it's showing up, when you search for a word less than 6 letters, but not by two words :shock: the next problem of hidden-bbcode-post is, that in the search-summery the preg_replace is not gripping, because eg [clipfish (and so on) turns to html-version <object (and so on). this means that i can not restrict search-summery-combinations of hidden-bbcode and hidden-bbcode-post, so i think (if i find no way to fix it) i redesign my mod to only one modul (hide bbcode), so you can make a [hide]-bbcode to hide a post completely.
here a little example for advanced using:
- makes it possible (e.g. for admins and mods) to post admin- or mod-messages by building a simple admin/mod bbcode-tag, eg:

Code: Select all

[admin]{TEXT}[/admin]

<span>{TEXT}</span>
so no one can see the communication between themselves, because of group rights and restricted bbcode.

another example
- build a general hide-bbcode, and all what lands in, is simply hidden, for the whole post ore the tag-content only

Code: Select all

[hide]{TEXT}[/hide]

<span>{TEXT}</span>
bcs. in this mode the mod works perfectly. ok, before my test's are done and i eventually back-build the one part, please do not use the hide-bbcode-post module and build a [hide] bbcode (see above)and restrict it by hide-bbcode module to have full safety. maybe than i will pimp this mod to more fields and more group per field.

at least undo this edit here in search.php
and delete includes/functions_hide_post_search.php
find

Code: Select all

				$tpl_ary = array(
					'POST_AUTHOR_FULL'		=> get_username_string('full', $row['poster_id'], $row['username'], $row['user_colour'], $row['post_username']),
					'POST_AUTHOR_COLOUR'	=> get_username_string('colour', $row['poster_id'], $row['username'], $row['user_colour'], $row['post_username']),
					'POST_AUTHOR'			=> get_username_string('username', $row['poster_id'], $row['username'], $row['user_colour'], $row['post_username']),
					'U_POST_AUTHOR'		    => get_username_string('profile', $row['poster_id'], $row['username'], $row['user_colour'], $row['post_username']),

					'POST_SUBJECT'		    => $row['post_subject'],
					'POST_DATE'			    => (!empty($row['post_time'])) ? $user->format_date($row['post_time']) : '',
					'MESSAGE'			    => $row['post_text']
					
				);
replace with

Code: Select all

                // 4seven
                include($phpbb_root_path . 'includes/functions_hide_post_search.' . $phpEx);
                // 4seven
                /*
				$tpl_ary = array(
					'POST_AUTHOR_FULL'		=> get_username_string('full', $row['poster_id'], $row['username'], $row['user_colour'], $row['post_username']),
					'POST_AUTHOR_COLOUR'	=> get_username_string('colour', $row['poster_id'], $row['username'], $row['user_colour'], $row['post_username']),
					'POST_AUTHOR'			=> get_username_string('username', $row['poster_id'], $row['username'], $row['user_colour'], $row['post_username']),
					'U_POST_AUTHOR'		    => get_username_string('profile', $row['poster_id'], $row['username'], $row['user_colour'], $row['post_username']),

					'POST_SUBJECT'		    => $row['post_subject'],
					'POST_DATE'			    => (!empty($row['post_time'])) ? $user->format_date($row['post_time']) : '',
					'MESSAGE'			    => $row['post_text']
					
				);	
                */         
note: maybe it is a bug only on my testboard (but i don't think so): so pls test this search-combination too..

regards
4seven
Current Mods | Mod Base | php(BB) programming | No help via PM

User avatar
4_seven
I've Been Banned!
Posts: 5155
Joined: Wed Apr 30, 2008 1:41 am

Re: [BETA] Hide Content 4 Groups - v.0.0.8.f

Post by 4_seven » Mon Nov 03, 2008 12:13 am

General Update-Info > v.0.0.8.f

>> please see first post for new screenshots and info <<

update info:

- from new package v.0.0.8.f load up the complete includes and language folder again

- than delete red marked edits

posting.php
// 4seven
if ($mode == 'quote'){

include($phpbb_root_path . 'includes/functions_hide_content_posting.' . $phpEx);
include($phpbb_root_path . 'includes/functions_hide_post_posting.' . $phpEx);

$message_parser_hidden = preg_replace($search_pattern, $pattern_replacement, $message_parser->message);

$post_data['post_text'] = $message_parser_hidden;}

else{
$post_data['post_text'] = $message_parser->message;}
// 4seven
viewtopic.php
// 4seven
include($phpbb_root_path . 'includes/functions_hide_content.' . $phpEx);
include($phpbb_root_path . 'includes/functions_hide_post.' . $phpEx);
// 4seven

includes/functions_posting.php

// 4seven
include($phpbb_root_path . 'includes/functions_hide_content.' . $phpEx);
include($phpbb_root_path . 'includes/functions_hide_post.' . $phpEx);
// 4seven
- than new edit:

Code: Select all

#
#-----[ OPEN ]------------------------------------------
#

search.php  

#
#-----[ FIND ]------------------------------------------
#

            // We pre-process some variables here for later usage

            // $row['post_text'] = censor_text($row['post_text']);

#
#-----[ REPLACE, WITH ]------------------------------------------
#

            // We pre-process some variables here for later usage
            
            // 4seven // $row['post_text'] = censor_text($row['post_text']);
               include($phpbb_root_path . 'includes/functions_hide_content.' . $phpEx);
               $row['post_text'] = preg_replace($search_pattern_hc, $pattern_replacement_hc, $target_source_hc_2);
            // 4seven
- than delete
includes/functions_hide_post.php
includes/functions_hide_post_posting.php

and if avaible .. delete
includes/functions_hide_post_search.php

- clear all caches
- thats it
Current Mods | Mod Base | php(BB) programming | No help via PM

User avatar
4_seven
I've Been Banned!
Posts: 5155
Joined: Wed Apr 30, 2008 1:41 am

Re: [BETA] Hide Content 4 Groups - v.0.0.8.f

Post by 4_seven » Tue Nov 04, 2008 7:21 pm

ok, no other problems will be seen.
next update is, to mark the hidden bbcodes as [hidden bbcode].
also, shure, you can blend out the buttons in acp > posting > bbcodes.

when (than) no more error reported, i go to [RC1] Status.

regards
4seven
Current Mods | Mod Base | php(BB) programming | No help via PM

khikho
Registered User
Posts: 46
Joined: Sat Nov 01, 2008 2:40 pm

Re: [BETA] Hide Content 4 Groups - v.0.0.8.f

Post by khikho » Sat Nov 08, 2008 12:53 pm

Thank you!

Can you Adapt it With Board3portal!!

Because the links is not hide!!

User avatar
4_seven
I've Been Banned!
Posts: 5155
Joined: Wed Apr 30, 2008 1:41 am

Re: [BETA] Hide Content 4 Groups - v.0.0.8.f

Post by 4_seven » Sun Nov 09, 2008 2:05 am

Board3portal is not standard-phpbb3.
if i have time next time i will take a look.
can't promise anything.
Current Mods | Mod Base | php(BB) programming | No help via PM

User avatar
hanjra
Registered User
Posts: 20
Joined: Fri Sep 19, 2008 2:02 pm
Contact:

Re: [BETA] Hide Content 4 Groups - v.0.0.8.f

Post by hanjra » Tue Nov 11, 2008 10:16 am

This is very good mod.... but i dont know how to hide the attachments??? Links are hidden and they are ok but attachments are not being hidden.... and in the readme file, you told to select the hide content post where is that???
A Place for your S60v3 Mobile
Mobile-Geeks

User avatar
4_seven
I've Been Banned!
Posts: 5155
Joined: Wed Apr 30, 2008 1:41 am

Re: [BETA] Hide Content 4 Groups - v.0.0.8.f

Post by 4_seven » Wed Nov 12, 2008 1:01 am

i forget to delete this part of instruction in cause of general update (thx + will correct it)
http://www.phpbb.com/community/viewtopi ... 5#p7577435

4 attachments read this edit 2:
http://www.phpbb.com/community/viewtopi ... 5#p7138485

..but i work on it (takes a time > 1-2 month)

regards
4seven
Current Mods | Mod Base | php(BB) programming | No help via PM

User avatar
hanjra
Registered User
Posts: 20
Joined: Fri Sep 19, 2008 2:02 pm
Contact:

Re: [BETA] Hide Content 4 Groups - v.0.0.8.f

Post by hanjra » Mon Nov 17, 2008 4:41 pm

I just found a bug in it or it is happening only with me.I added the "url" code to hide from guests and added all groups IDs in unhide option. Well its all workign ok. Guests cant see the links but registered users can see . Now I created a group named Contributers and added a user to it as his defualt group but when he visits the board the links are still hidden but for other registered users the links are not hidden. Although i have added the group id in unhide option. But still this particular cant see the links.
A Place for your S60v3 Mobile
Mobile-Geeks

User avatar
eman80
Registered User
Posts: 327
Joined: Tue Aug 19, 2008 1:49 pm

Re: [BETA] Hide Content 4 Groups - v.0.0.8.f

Post by eman80 » Mon Nov 17, 2008 4:56 pm

hanjra wrote:I just found a bug in it or it is happening only with me.I added the "url" code to hide from guests and added all groups IDs in unhide option. Well its all workign ok. Guests cant see the links but registered users can see . Now I created a group named Contributers and added a user to it as his defualt group but when he visits the board the links are still hidden but for other registered users the links are not hidden. Although i have added the group id in unhide option. But still this particular cant see the links.
you can add three groubs only to unhide option per one field.
but administrator groub can see everything without adding his groub to unhide option.

and if u add more than three groubs to unhide option, only first three groubs will take the mod active.

Regards

Eman
welcome to my forum:
http://www.elibrary4arab.com

unicursal
Registered User
Posts: 15
Joined: Sun Dec 10, 2006 5:45 am

Re: [BETA] Hide Content 4 Groups - v.0.0.8.f

Post by unicursal » Sat Nov 29, 2008 5:12 am

Instruction for v.0.0.8.f contains the following:

Code: Select all

#
#-----[ OPEN ]------------------------------------------
#

search.php  

#
#-----[ FIND ]------------------------------------------
#

            // We pre-process some variables here for later usage

            // $row['post_text'] = censor_text($row['post_text']);

#
#-----[ REPLACE, WITH ]------------------------------------------
#

            // We pre-process some variables here for later usage
            
            // 4seven // $row['post_text'] = censor_text($row['post_text']);
               include($phpbb_root_path . 'includes/functions_hide_content.' . $phpEx);
               $row['post_text'] = preg_replace($search_pattern_hc, $pattern_replacement_hc, $target_source_hc_2);
            // 4seven
however in phpBB 3.0.3 this line

Code: Select all

				$row['post_text'] = censor_text($row['post_text']);
is not COMMENTED.

Should it be still left commented out in your replace code?

unicursal
Registered User
Posts: 15
Joined: Sun Dec 10, 2006 5:45 am

Re: [BETA] Hide Content 4 Groups - v.0.0.8.f

Post by unicursal » Sat Nov 29, 2008 9:12 am

For some reason I was getting two combo boxes on module page (BBCodes and Group-IDs) unpopulated.

It could be my browser settings, though, or some other local things.

Anyway, after some experiments I ended up with some code tweak that works for me. Maybe it could help someone else ...

Note: not sure why, but when I "select all" from code snippets below and try to find, say, in Dreamweaver or UltraEdit, I can't get exact match. But it's there! I'm sure, you'll manage to find it ...

Open bb_gr_menu.php

Find

Code: Select all

echo '<select style="font-family: Lucida Grande, Verdana, Helvetica, Arial, sans-serif; font-size: 12px; background: #EFEFEF">';
$res=mysql_query('SELECT bbcode_tag FROM ' . BBCODES_TABLE);
for($i=0;$i<mysql_num_rows($res);$i++) {
$row=mysql_fetch_assoc($res); 
echo "<option>$row[bbcode_tag]</option>";
$db->sql_freeresult($result);
}
Replace with

Code: Select all

echo '<select style="font-family: Lucida Grande, Verdana, Helvetica, Arial, sans-serif; font-size: 12px; background: #EFEFEF">';
$res=$db->sql_query('SELECT bbcode_tag FROM ' . BBCODES_TABLE);
while ($row = $db->sql_fetchrow($res))
{
	echo "<option>$row[bbcode_tag]</option>";
}
$db->sql_freeresult($res);
Find

Code: Select all

echo '<select style="font-family: Lucida Grande, Verdana, Helvetica, Arial, sans-serif; font-size: 12px; background: #EFEFEF">';
$res=mysql_query('SELECT group_id, group_name FROM ' . GROUPS_TABLE);
for($i=0;$i<mysql_num_rows($res);$i++) {
$row=mysql_fetch_assoc($res); 

echo "<option>$row[group_id]&nbsp;$row[group_name]</option>";
$db->sql_freeresult($result); 
}
Replace with

Code: Select all

echo '<select style="font-family: Lucida Grande, Verdana, Helvetica, Arial, sans-serif; font-size: 12px; background: #EFEFEF">';
$res=$db->sql_query('SELECT group_id, group_name FROM ' . GROUPS_TABLE);
while ($row = $db->sql_fetchrow($res))
{
	echo "<option>$row[group_id]&nbsp;$row[group_name]</option>";
}
$db->sql_freeresult($res);

Locked

Return to “[3.0.x] Abandoned MODs”