|
Page 1 of 1
|
aliks0905
Joined: April 2007
Posts: 16
|
HIDE BBCode Customization Question
Hi,
how can I customize my hide bbcode so that instead of showing a message "Sorry ....you must reply to see this message" it shows the "Thanks" Button that they click on and then they see the message. Thanks
|
#1 Thu 01 Nov, 2007 19:22 |
|
Sponsors
|
Icy Phoenix is an open source project, you can show your appreciation and support future development by donating to the project.
|
|
novice programmer
Joined: June 2007
Posts: 1030
Location:
|
Re: [hide[ Bbcode Customization Question
If you use the beta, it is included.
If you use other version, seach a little bit, there is a topic with that info
|
#2 Thu 01 Nov, 2007 19:43 |
|
aliks0905
Joined: April 2007
Posts: 16
|
Re: [hide[ Bbcode Customization Question
I looked around and only found one post that was closed because the guy was begging too much. but no other posts on how to implement the thanks button into the hide bbcode. anyways, I tweaked my bbcode a little. check it out and see if there are any errors
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);
$show = $db->sql_numrows($resultat) ? true : false;
if ( ($userdata['user_level'] == ADMIN) || ($userdata['user_level'] == MOD) || ($userdata['user_posts'] > 50))
{
$show = true;
}
}
// generate html
$html = '<blockquote class="quote"><div class="quote-nouser">' . $lang['xs_bbc_hide_message'] . ':</div><div class="post-text">';
if(!$show)
{
return array(
'valid' => true,
'html' => $html . '<center><img src="images/bbcb_mg/images/hidemessage.png" border="0"/></center><br />' . $lang['xs_bbc_hide_message_explain'] . '</div></blockquote>',
'allow_nested' => false,
);
}
else
{
return array(
'valid' => true,
'start' => $html,
'end' => '</div></blockquote>'
);
}
}
Edited by novice programmer, Thu 01 Nov, 2007 20:56: added spoiler and deleted lines |
#3 Thu 01 Nov, 2007 20:45 |
|
jz
Joined: August 2006
Posts: 217
Location: London
|
Re: [hide[ Bbcode Customization Question
|
#4 Fri 02 Nov, 2007 10:55 |
|
novice programmer
Joined: June 2007
Posts: 1030
Location:
|
Re: [hide[ Bbcode Customization Question
Oh, i forgot telling you shouldn´t put large pieces of code outside a spoiler..
|
#5 Fri 02 Nov, 2007 12:05 |
|
xmenfile
Joined: September 2007
Posts: 482
Location: Right in front of my computer
|
Re: [hide[ Bbcode Customization Question
I looked around and only found one post that was closed because the guy was begging too much. but no other posts on how to implement the thanks button into the hide bbcode. anyways, I tweaked my bbcode a little. check it out and see if there are any errors
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);
$show = $db->sql_numrows($resultat) ? true : false;
if ( ($userdata['user_level'] == ADMIN) || ($userdata['user_level'] == MOD) || ($userdata['user_posts'] > 50))
{
$show = true;
}
}
// generate html
$html = '<blockquote class="quote"><div class="quote-nouser">' . $lang['xs_bbc_hide_message'] . ':</div><div class="post-text">';
if(!$show)
{
return array(
'valid' => true,
'html' => $html . '<center><img src="images/bbcb_mg/images/hidemessage.png" border="0"/></center><br />' . $lang['xs_bbc_hide_message_explain'] . '</div></blockquote>',
'allow_nested' => false,
);
}
else
{
return array(
'valid' => true,
'start' => $html,
'end' => '</div></blockquote>'
);
}
}
Has anyone tried this? and please let me know which file and how to edit it?
Thank you a bunch
|
#6 Tue 12 Feb, 2008 05:44 |
|
Zuker
Joined: August 2006
Posts: 2134
Location: BA
|
Re: [hide[ Bbcode Customization Question
that lines are in bbcode.php i posted how to. please search
____________ ? Zuker - EDDB - LPM - Sharefields
|
#7 Thu 14 Feb, 2008 00:19 |
|
xmenfile
Joined: September 2007
Posts: 482
Location: Right in front of my computer
|
Re: [hide[ Bbcode Customization Question
that lines are in bbcode.php i posted how to. please search
you mean this http://www.icyphoenix.com/viewtopic.php?t=1533? That's what i have on my IP, but i am looking for the code for user to open by click on "Thanks" button, not "Reply" just like the 1st post said. Please correct me if iam wrong.
|
#8 Thu 14 Feb, 2008 00:58 |
|
Zuker
Joined: August 2006
Posts: 2134
Location: BA
|
Re: [hide[ Bbcode Customization Question
i answer that before.like i told you
Please search, thanks
____________ ? Zuker - EDDB - LPM - Sharefields
|
#9 Thu 14 Feb, 2008 23:03 |
|
xmenfile
Joined: September 2007
Posts: 482
Location: Right in front of my computer
|
Re: [hide[ Bbcode Customization Question
I found it. Thank you Zuker.
But I need 1 last modify for this message
Sorry, but you must be registered and also must post a reply to view this message.
I want it to say
registered users must click thanks button to view the hidden message
I have edited bbcb_mg.js, but did not work. Can anyone show me how to fix it? I appreciate it.
s_hide_help = 'Hide a text, registered users must click thanks button to view the hidden message: [hide]Hidden Message[/hide]';
PS: I also created 2 image and want to share them.
Description: |
|
Filesize: |
6.99 KB |
Viewed: |
7840 Time(s) |
|
Description: |
|
Filesize: |
6.52 KB |
Viewed: |
7840 Time(s) |
|
|
#10 Mon 18 Feb, 2008 22:32 |
|
Zuker
Joined: August 2006
Posts: 2134
Location: BA
|
Re: [hide[ Bbcode Customization Question
che en lang_bbcb_mg, i think that lines are there
____________ ? Zuker - EDDB - LPM - Sharefields
|
#11 Mon 18 Feb, 2008 23:38 |
|
xmenfile
Joined: September 2007
Posts: 482
Location: Right in front of my computer
|
Re: HIDE BBCode Customization Question
Stupid me, i edited wrong file. it's good now.
Thank you Zuker
|
#12 Tue 19 Feb, 2008 00:28 |
|
|
Page 1 of 1
|
Was this topic useful?
Was this topic useful?
Link this topic |
URL |
|
BBCode |
|
HTML |
|
You cannot post new topics You cannot reply to topics You cannot edit your posts You cannot delete your posts You cannot vote in polls You cannot attach files You can download files You cannot post calendar events
|
|
|
|