Icy Phoenix

     
 


Post new topic  Reply to topic 
Page 1 of 3
Goto page 1, 2, 3  Next
 
Reply with quote Download Post 
Post BBCode Hide Message With An Image Buttom 
 
This is a simple method to have a bbcode Hide message with an image (with the message that says that you must post a reply to view the hidden message).

This image will be shown to explain that there is a hidden message: Example

Rename this image as hide_yes.gif and upload to: /images/bbcb_mg/images/

And this image will be shown when users are able to see the hidden message: Example

Rename this image as hide_no.gif and upload to: /images/bbcb_mg/images/

Example Images of this hack: When the message is hidden / When the message is not hidden

In /includes/bbcode.php

FIND:
Code: [Download] [Hide] [Select]
            // 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 . $lang['xs_bbc_hide_message_explain'] . '</div></blockquote>',
                    'allow_nested' => false,
                );
            }
            else
            {
                return array(
                    'valid' => true,
                    'start' => $html,
                    'end' => '</div></blockquote>'
                );
            }


REPLACE WITH

Code: [Download] [Hide] [Select]
            // 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/hide_yes.gif" border="0"/></center><br />' . $lang['xs_bbc_hide_message_explain'] . '</div></blockquote>',
                    'allow_nested' => false,
                );
            }
            else
            {
                return array(
                    'valid' => true,
                    'start' => $$html . '<center><img src="images/bbcb_mg/images/hide_no.gif" border="0"/></center><br />',
                    'end' => '</div></blockquote>'
                );
            }


With this changes, we have an image with the text of BBcode Hide explain.

But, the BBcode Hide doesn't have a bbcode button on posting.php (on reply).
With this changes, you can add this button.
Example Image of the button: Image of the button pressed
Follow this instructions:

Upload to /images/bbcb_mg/images/gif this images:
hide7aq = (rename this to hide.gif)
hide13lp = (rename this to hide1.gif)

In /languages/lang_xxx/lang_bbcb_mg.php

FIND:
Code: [Download] [Hide] [Select]
$lang['bbcb_mg_highlight'] = 'Highlight';


AFTER, ADD

Code: [Download] [Hide] [Select]
$lang['bbcb_mg_hide'] = 'Hide a message';


FIND:
Code: [Download] [Hide] [Select]
$lang['s_highlight_help'] =


AFTER, ADD

Code: [Download] [Hide] [Select]
$lang['s_hide_help'] = 'Hide a text, registered users must reply or thanks topic to view the hidden message: [hide]Hidden Message[/hide]';


In /includes/bbcb_mg.php

FIND:
Code: [Download] [Hide] [Select]
    'L_BBCB_MG_HIGHLIGHT' => $lang['bbcb_mg_highlight'],


AFTER, ADD

Code: [Download] [Hide] [Select]
    'L_BBCB_MG_HIDE' => $lang['bbcb_mg_hide'],


FIND:
Code: [Download] [Hide] [Select]
    'L_HIGHLIGHT_HELP' => $lang['s_highlight_help'],


AFTER, ADD

Code: [Download] [Hide] [Select]
    'L_HIDE_HELP' => $lang['s_hide_help'],


In /languages/lang_xxx/bbcb_mg.js

FIND:
Code: [Download] [Hide] [Select]
s_smiley_creator = 'Smiley Creator: [smiley=1]Text[/smiley] insert a smiley with text';


AFTER, ADD

Code: [Download] [Hide] [Select]
s_hide_help = 'Hide a text, registered users must reply or thanks topic to view the hidden message: [hide]Hidden Message[/hide]';


FIND:

Code: [Download] [Hide] [Select]
var Td = 0;


AFTER ADD:

Code: [Download] [Hide] [Select]
var Hide = 0;


FIND:

Code: [Download] [Hide] [Select]
'[highlight=]'


AFTER ADD

Code: [Download] [Hide] [Select]
'[hide]','[/hide]',


FIND:

Code: [Download] [Hide] [Select]
function BBCbold()


BEFORE ADD:

Code: [Download] [Hide] [Select]
function BBChide()
{
    var txtarea = document.post.message;

    if ((clientVer >= 4) && is_ie && is_win)
    {
        theSelection = document.selection.createRange().text;
        if (theSelection != '')
        {
            document.selection.createRange().text = "[hide]" + theSelection + "[/hide]";
            document.post.message.focus();
            return;
        }
    }
    else if (txtarea.selectionEnd && (txtarea.selectionEnd - txtarea.selectionStart > 0))
    {
        //mozWrap(txtarea, "[hide]", "[/hide]");
        mozInsert(txtarea, "[hide]", "[/hide]");
        return;
    }
    if (Hide == 0)
    {
        ToAdd = "[hide]";
        document.post.hide_img.src = bbcb_mg_img_path + "hide1" + bbcb_mg_img_ext;
        Hide = 1;
    }
    else
    {
        ToAdd = "[/hide]";
        document.post.hide_img.src = bbcb_mg_img_path + "hide" + bbcb_mg_img_ext;
        Hide = 0;
    }
    PostWrite(ToAdd);
}


In /templates/mg_themes/bbcb_mg.tpl

FIND:

Code: [Download] [Hide] [Select]
                    <a href="javascript:BBChl()" ><img src="{BBCB_MG_IMG_PATH}highlight{BBCB_MG_IMG_EXT}" name="highlight" onMouseOver="helpline('highlight')" alt="{L_BBCB_MG_HIGHLIGHT}" title="{L_BBCB_MG_HIGHLIGHT}" class="bbimages" /></a>


AFTER ADD:
Code: [Download] [Hide] [Select]
                    <a href="javascript:BBChide()"><img src="{BBCB_MG_IMG_PATH}hide{BBCB_MG_IMG_EXT}" name="hide_img" onMouseOver="helpline('hide')" alt="{L_BBCB_MG_HIDE}" title="{L_BBCB_MG_HIDE}" class="bbimages" /></a>


Now, with this changes, we have a new button to use the bbcode hide in the posting page
 




____________
? Zuker - EDDB - LPM - Sharefields
 
Last edited by Zuker on Thu 06 Mar, 2008 13:19; edited 4 times in total 
ZukerSend private messageVisit poster's website  
Back to topPage bottom
Icy Phoenix is an open source project, you can show your appreciation and support future development by donating to the project.

Support us
 
Reply with quote Download Post 
Post Re: BBCode Hide message with an image buttom 
 
thank you zuker for this
 




____________

Play Games at GamesCampus!
 
KugeLSichASend private messageVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post Re: BBCode Hide Message With An Image Buttom 
 
Thanks this work perfect
 



 
diegomakSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: BBCode Hide Message With An Image Buttom 
 
hey thank you for that ..really helps worked!!
but.. the combination between thanks button don't work if i press thanks the post is hidded is their a possibillity/solution for that?!?!
 



 
testSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: BBCode Hide message with an image buttom 
 
there it's no combination in ip for that at the moment
 




____________
? Zuker - EDDB - LPM - Sharefields
 
ZukerSend private messageVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post Re: BBCode Hide Message With An Image Buttom 
 
Puting this on bbcode.php
Quote:
FIND:
Code: [Download] [Hide] [Select]
Code: [Download] [Show]
           // 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 . $lang['xs_bbc_hide_message_explain'] . '</div></blockquote>',
                    'allow_nested' => false,
                );
            }
            else
            {
                return array(
                    'valid' => true,
                    'start' => $html,
                    'end' => '</div></blockquote>'
                );
            }


REPLACE WITH

Code: [Download] [Hide] [Select]
Code: [Download] [Show]
           // 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/hide_yes.gif" border="0"/></center><br />' . $lang['xs_bbc_hide_message_explain'] . '</div></blockquote>',
                    'allow_nested' => false,
                );
            }
            else
            {
                return array(
                    'valid' => true,
                    'start' => $html . '<center><img src="images/bbcb_mg/images/hide_no.gif" border="0"/></center><br />',
                    'end' => '</div></blockquote>'
                );
            }

I have this error:
Code: [Download] [Hide] [Select]
Parse error: syntax error, unexpected T_VARIABLE, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /home/www/downloading.mygamesonline.org/includes/bbcode.php on line 3550

   what can i do?
Zuker if you are spanish answer me in spanish plz.
 



 
chusrubi2Send private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: BBCode Hide message with an image buttom 
 
u are making some edit wrogn

attach me your file so i can check it
 




____________
? Zuker - EDDB - LPM - Sharefields
 
ZukerSend private messageVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post Re: BBCode Hide Message With An Image Buttom 
 
I have added the file adjunt in .rar. Modify it plz

bbcode.rar
Description: File 
Download
Filename: bbcode.rar
Filesize: 21.01 KB
Downloaded: 348 Time(s)

 



 
chusrubi2Send private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: BBCode Hide message with an image buttom 
 
But you are gaving me the clean file
Try to do it and if u can't, attach the modded file
 




____________
? Zuker - EDDB - LPM - Sharefields
 
ZukerSend private messageVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post Re: BBCode Hide Message With An Image Buttom 
 
Thanks Zuker!!! I did it.

Thanks men.
 



 
leonidfgSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: BBCode Hide Message With An Image Buttom 
 
I have a problem. I had one modification. When I push the button not view the message Original (Quoted Hidden Message, which is still hidden.). There aren't message

But, if I write a word, I select the word with the mouse and I push the eye,...:

wordundefined

Im spanish, sorry my bad english ^^

IN SPANISH...

Yo tengo un problema. He hecho una modificación. Cuando yo hago click en el botón no veo el mensaje original (....). No me sale nada, en blanco [Así quería yo ^^].... hasta aquí todo bien.

Pero, si yo escribo una palabara, Yo la selecciono con el ratón y pulso en el botón del ojo, me sale...

palabraundefined

Nosé si me explico. Si primero pongo hide y luego escribo bien
 



 
SerginiSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: BBCode Hide Message With An Image Buttom 
 
Hi again... in all this HIDE button stuff I have another question.

There's a way to the hide messages may be visible only to the registered users without the need of posting a message? An example may be the Thanks button that allow to see the hide messages.

But I didn't find a post with this Thanks button MOD.

Anyone here know how to do it.

Bye...!
 



 
leonidfgSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: BBCode Hide message with an image buttom 
 
I think it has already been posted somewhere here... try to search...
 




____________
Luca
SEARCH is the quickest way to get support.
Icy Phoenix ColorizeIt - CustomIcy - HON
 
Mighty GorgonSend private messageSend e-mail to userVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post Re: BBCode Hide message with an image buttom 
 
leonidfg wrote: [View Post]
Hi again... in all this HIDE button stuff I have another question.

There's a way to the hide messages may be visible only to the registered users without the need of posting a message? An example may be the Thanks button that allow to see the hide messages.

But I didn't find a post with this Thanks button MOD.

Anyone here know how to do it.

Bye...!


on bbcode.php & viewtopic.php

replace

Quote:
            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))
                {
                    $show = true;
                }
            }


with

Code: [Download] [Hide] [Select]
                if ( ($userdata['session_logged_in'] )
                {
                    $show = true;
                }


test it  
 




____________
? Zuker - EDDB - LPM - Sharefields
 
ZukerSend private messageVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post Re: BBCode Hide Message With An Image Buttom 
 
hello can configure to allow groups that not  post to view the content ?
 



 
robin crackerSend private messageVisit poster's website  
Back to topPage bottom
Post new topic  Reply to topic  Page 1 of 3
Goto page 1, 2, 3  Next


Display posts from previous:    

HideWas this topic useful?

Link this topic
URL
BBCode
HTML




 
Permissions List
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


  

 

  cron