[2.0.12] Hide BBcode MOD

The cleanup is complete. This forum is now read only.

Rating:

Excellent!
42
72%
Very Good
3
5%
Good
8
14%
Fair
0
No votes
Poor
5
9%
 
Total votes: 58

Deco20
Registered User
Posts: 97
Joined: Sat Oct 22, 2005 2:57 pm

Post by Deco20 » Tue Jun 27, 2006 2:52 am

Any website where I can see this mod?

clight77
Registered User
Posts: 907
Joined: Sun May 11, 2003 11:09 pm

Allow certain groups access to hidden tags

Post by clight77 » Wed Jun 28, 2006 1:23 am

Allow certain groups access to hidden tags

--------------------------------------------------------------------------------

Hi:)
I have installed: MOD "HIDE" (aka lockdown)

But I wish to allow certain groups access to hidden tags without having to post the required amount I have set this mod to.

I am sure it is in viewtopics.php to change but I do not know where or how.

Thanks as always
I Follow Up On My Posts.
So Should Everybody...

Shargo
Registered User
Posts: 49
Joined: Sun Oct 10, 2004 3:09 pm

Post by Shargo » Sat Jul 15, 2006 2:40 am

Does anyone knows how to Display an Image instead of text.

Like it does in IPB or vBulletin or whatever...

I want it to display an image instead of this text--- You need to post in this topic to see the hidden message

clight77
Registered User
Posts: 907
Joined: Sun May 11, 2003 11:09 pm

Post by clight77 » Sat Jul 15, 2006 4:36 am

In templates/bbcode.tpl
FIND
<td><span class="genmed">
and ADD SOMETHING LIKE THIS..


<tr>
<td><span class="genmed"><b>Hidden Message/Link:<br /> <img src= "http://www.101uses.com/fantastic/images/sonic.gif"> </b></span></td>
</tr>

I do not use image, this is just a how to..
I Follow Up On My Posts.
So Should Everybody...

Shargo
Registered User
Posts: 49
Joined: Sun Oct 10, 2004 3:09 pm

Post by Shargo » Sat Jul 15, 2006 5:55 am

Thanks...It worked :)

clight77
Registered User
Posts: 907
Joined: Sun May 11, 2003 11:09 pm

Post by clight77 » Sat Jul 15, 2006 6:01 am

Glad it did :)
I Follow Up On My Posts.
So Should Everybody...

User avatar
RATT
Registered User
Posts: 734
Joined: Fri Aug 19, 2005 6:27 am

Post by RATT » Sat Aug 12, 2006 12:49 am

how can we alter this for only registered members to have the ability to be able to see the hidden text?

clight77
Registered User
Posts: 907
Joined: Sun May 11, 2003 11:09 pm

Post by clight77 » Sat Aug 12, 2006 8:00 pm

RATT

This will give you an idea how to do what you want....

This worked for me, I am usinghide tags with donation mod tho but it works on groups also.
So maybe you can adapt this to your use


Actually donation mod do allow you to increase user's post count or increase his points, and you can also assign them a special rank and add them into two groups depends on their donation amount.

if you want user to be able to view hidden content after donation:
you can add them into the two groups, then in viewtopic.php file, add something like this: just an idea may have something wrong in coding.

for example in viewtopic.php

find

$valid = FALSE;
if( $userdata['session_logged_in'] ) {
$sql = "SELECT p.poster_id, p.topic_id
FROM " . POSTS_TABLE . " p
WHERE p.topic_id = $topic_id
AND p.poster_id = " . $userdata['user_id'];
$resultat = $db->sql_query($sql);
$valid = $db->sql_numrows($resultat) ? TRUE : FALSE;}}


after add:

if($valid === FALSE)
{
$sql = "SELECT COUNT(*) as num FROM " . USER_GROUP_TABLE . " WHERE group_id = " . intval($board_config['donate_to_grp_two']) . " OR group_id = " . intval($board_config['donate_to_grp_one']) . " AND user_id = " . $userdata['user_id'];
if ( ($result = $db->sql_query($sql)) )
{
if ( $row = $db->sql_fetchrow($result) )
{
if($row['num'] > 0)
{
//user can view hidden content
$valid = TRUE;
}
}
}
}


You will have to do the same thing for topic_review.php

THX to sandodo at another site for this
I Follow Up On My Posts.
So Should Everybody...

User avatar
RATT
Registered User
Posts: 734
Joined: Fri Aug 19, 2005 6:27 am

Post by RATT » Sun Aug 13, 2006 1:00 am

thanks alot for that reply, however im not using a donation mod and i know that urs was just an example of wut i could do, Do you or anyone else know the exact coding i need to put in and where, so that only registered members will have the ability to view the hidden text?

clight77
Registered User
Posts: 907
Joined: Sun May 11, 2003 11:09 pm

Post by clight77 » Sun Aug 13, 2006 1:30 am

I am not great at php but try this.

find

$valid = FALSE;
if( $userdata['session_logged_in'] ) {
$sql = "SELECT p.poster_id, p.topic_id
FROM " . POSTS_TABLE . " p
WHERE p.topic_id = $topic_id
AND p.poster_id = " . $userdata['user_id'];
$resultat = $db->sql_query($sql);
$valid = $db->sql_numrows($resultat) ? TRUE : FALSE;}


after add:

if($valid === FALSE)
{
$sql = "SELECT COUNT(*) as num FROM " . USER_TABLE . " WHERE user_id = " . intval($board_config['rds_override_users']) . " AND user_id = " . $userdata['user_id'];
if ( ($result = $db->sql_query($sql)) )
{
if ( $row = $db->sql_fetchrow($result) )
{
if($row['num'] > 0)
{
//user can view hidden content
$valid = TRUE;
}
}
}
}
I Follow Up On My Posts.
So Should Everybody...

User avatar
RATT
Registered User
Posts: 734
Joined: Fri Aug 19, 2005 6:27 am

Post by RATT » Sun Aug 13, 2006 1:55 am

This is the only line im findin that shows auth for posting or readin a post

Code: Select all

//
// Start auth check
//
$is_auth = array();
$is_auth = auth(AUTH_ALL, $forum_id, $userdata, $forum_topic_data);

if( !$is_auth['auth_view'] || !$is_auth['auth_read'] )
{
	if ( !$userdata['session_logged_in'] )
	{
		$redirect = ($post_id) ? POST_POST_URL . "=$post_id" : POST_TOPIC_URL . "=$topic_id";
		$redirect .= ($start) ? "&start=$start" : '';
		redirect(append_sid("login.$phpEx?redirect=viewtopic.$phpEx&$redirect", true));
	}

	$message = ( !$is_auth['auth_view'] ) ? $lang['Topic_post_not_exist'] : sprintf($lang['Sorry_auth_read'], $is_auth['auth_read_type']);

	message_die(GENERAL_MESSAGE, $message);
}
//
// End auth check
//

Redbearns
Registered User
Posts: 1
Joined: Thu Aug 31, 2006 5:13 pm

Subsilver Yes subBlack No

Post by Redbearns » Thu Aug 31, 2006 5:35 pm

Hi
I have this mod installed and it works great with subSilver with no problems.
I also have subBlack but I’m having no luck getting it to work on this skin. I do see the tag button and when I use it, it does show the proper tags [hide] example [/hide] but it does not hide.

I thought it would be the template files since there was no problem in subSilver, So I checked my subBlack template files to see if I was missing anything and it seems to be ok but it just wont hide in my subBlack template.

Please help my brain is already half way melted. :wink:

fmmido
Registered User
Posts: 1
Joined: Tue Sep 05, 2006 2:28 pm

Post by fmmido » Tue Sep 05, 2006 2:31 pm

What about thise hack if i'd a free forum ?
like myfreeforum.org

Murty
Registered User
Posts: 6
Joined: Sat May 27, 2006 11:52 am
Contact:

Post by Murty » Wed Sep 06, 2006 6:17 pm

have you guys got a different mod

i'm dutch, my engelish is not good

i want a mod jou must post some message to see the hidden content not to clicking it only post something

taifunbrowser
Registered User
Posts: 60
Joined: Sun Sep 10, 2006 2:09 am
Contact:

asdf

Post by taifunbrowser » Sun Sep 10, 2006 2:41 am

Errrr

Has this been modified yet to instead have the user click a Button on which is written the prompt text?

i.e:

good-looking button with "click this!" written on it, reveals a veryyy large image when clicked, very useful.

I found this for 3 other kinds of forums, but have not found for phpbb yet <_< err

*searches some more*

will this be modified to have a button... ever?

Post Reply

Return to “[2.0.x] MOD Database Cleanup”

Who is online

Users browsing this forum: No registered users and 4 guests