[MOD] BBCode Hide message with an image


Goto page 1, 2, 3  Next

Subject: [MOD] BBCode Hide message with an image
MODification by Mitch in Spanish and translation English.

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).
The Image to explain the hide message: Example of Image to show with the bbcode hide message (example)

Example Image of this hack: Hide Text with Image

In /includes/bbcode.php

FIND:
Code: [Download] [Hide]
  1. $html .= '<div class="quote-message">' . $lang['xs_bbc_hide_message_explain'] . '</div>'; 


BEFORE ADD (or AFTER, if you want the image after the message explain):
Code: [Download] [Hide]
  1. $html .= '<img src="http://Here-is-the-url-of-image.jpg" border="0"/>'; 

(here you can put <center> or any html code)

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/ this images:
hide7aq = (rename this to hide.gif)
hide13lp = (rename this to hide1.gif)

In /languages/lang_xxx/bbcb_mg.js

FIND:
Code: [Download] [Hide]
  1. s_smiley_creator = 


AFTER, ADD (in the next line):
Code: [Download] [Hide]
  1. s_hide_help = 'Hide a text, the registered users must post a reply to view the hidden message: [hide]Message[/hide]'; 


FIND:
Code: [Download] [Hide]
  1. var Td = 0; 


AFTER ADD:
Code: [Download] [Hide]
  1. var Hide = 0; 


FIND:
Code: [Download] [Hide]
  1. '[highlight=]' 


AFTER ADD (in the next line):
Code: [Download] [Hide]
  1. '[hide]','[/hide]', 


FIND:
Code: [Download] [Hide]
  1. function BBCbold() 


BEFORE ADD:
Code: [Download] [Hide]
  1. function BBChide()  
  2. {  
  3. var txtarea = document.post.message;  
  4.  
  5. if ((clientVer >= 4) && is_ie && is_win)  
  6. {  
  7. theSelection = document.selection.createRange().text;  
  8. if (theSelection != '')  
  9. {  
  10. document.selection.createRange().text = "[hide]" + theSelection + "[/hide]";  
  11. document.post.message.focus();  
  12. return;  
  13. }  
  14. }  
  15. else if (txtarea.selectionEnd && (txtarea.selectionEnd - txtarea.selectionStart > 0))  
  16. {  
  17. //mozWrap(txtarea, "[hide]", "[/hide]");  
  18. mozInsert(txtarea, "[hide]", "[/hide]");  
  19. return;  
  20. }  
  21. if (Hide == 0)  
  22. {  
  23. ToAdd = "[hide]";  
  24. document.post.hide.src = bbcb_mg_img_path + "hide1.gif";  
  25. Hide = 1;  
  26. }  
  27. else  
  28. {  
  29. ToAdd = "[/hide]";  
  30. document.post.hide.src = bbcb_mg_img_path + "hide.gif";  
  31. Hide = 0;  
  32. }  
  33. PostWrite(ToAdd);  


In /templates/ca_aphrodite/bbcb_mg.tpl

FIND:
Code: [Download] [Hide]
  1. <a href="javascript:BBChl()" ><img border="0" src="{BBCB_MG_IMG_PATH}spoil.gif" name="highlight" type="image" onMouseOver="helpline('highlight')" alt="{L_BBCB_MG_HIGHLIGHT}" title="{L_BBCB_MG_HIGHLIGHT}" /></a> 


AFTER ADD:
Code: [Download] [Hide]
  1. <a href="javascript:BBChide()" ><img border="0" src="{BBCB_MG_IMG_PATH}hide.gif" name="hide" type="image" onMouseOver="helpline('hide')" alt="Hide a text" title="Hide a Text" /></a> 

(note: the text in alt="" and title="" must be with {language}, but i don“t know how to add this :()

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

PD: Sorry for my bad english ;)

Subject: Respuesta: [MOD] BBCode Hide message with an image
Optional: With this changes, we can delete the "table" of the bbcode hide explain (because with the image, this table isn't good)
Example Images: Hide Message without the text and table - Hidden message after reply (don't have modifications)

In /includes/bbcode.php

FIND AND DELETE (or comment the line with //):
Code: [Download] [Hide]
  1. $html = '<blockquote class="quote">';  
  2. $html .= '<div class="quote-nouser">' . $lang['xs_bbc_hide_message'] . ':</div>'; 


FIND AND DELETE:
Code: [Download] [Hide]
  1. $html .= '<div class="quote-message">' . $lang['xs_bbc_hide_message_explain'] . '</div>'; 


FIND AND DELETE:
Code: [Download] [Hide]
  1. $html .= '</blockquote>'; 


FIND:
Code: [Download] [Hide]
  1. $html .= '<div class="quote-message">'; 


BEFORE ADD:
Code: [Download] [Hide]
  1. $html = '<blockquote class="quote">';  
  2. $html .= '<div class="quote-nouser">' . $lang['xs_bbc_hide_message'] . ':</div>';  
  3.  


Finish :P

PD: Sorry for my bad english again ;D

Subject: Re: [MOD] BBCode Hide Message With An Image
thank for sharing :D

Subject: Re: [MOD] BBCode Hide message with an image
Great work my friend! :wink:

Subject: Re: [MOD] BBCode Hide Message With An Image
DOESNT WORK WITH ICY PHOENIX




please some1 rewrite the code for icy phoenix!!!!

Profile PM  
Subject: Re: [MOD] BBCode Hide Message With An Image
fidunderground wrote: [View Post]
DOESNT WORK WITH ICY PHOENIX




please some1 rewrite the code for icy phoenix!!!!




BUMP

Profile PM  
Subject: Re: [MOD] BBCode Hide Message With An Image
Hidden Message:
Sorry, but you must be registered and also post a reply to view this message.

work with IP ..... only no pics by bbcode like www .... etc.

Subject: Re: [MOD] BBCode Hide message with an image
fidunderground wrote: [View Post]
fidunderground wrote: [View Post]
DOESNT WORK WITH ICY PHOENIX




please some1 rewrite the code for icy phoenix!!!!




BUMP


Why are you bumping your own message within hours ???

you have earn a yellow card

Subject: Re: [MOD] BBCode Hide Message With An Image
Zuker wrote: [View Post]
fidunderground wrote: [View Post]
fidunderground wrote: [View Post]
DOESNT WORK WITH ICY PHOENIX
oops im so sorry.....illl be cAREful next time...



please some1 rewrite the code for icy phoenix!!!!




BUMP


Why are you bumping your own message within hours ???

you have earn a yellow card



Op

Profile PM  
Subject: Re: [MOD] BBCode Hide Message With An Image
mmmm... doesnt work for IP, I tried to installed but the bbcode is different. :( :( :( , somebody can update to this MOD for IP, pleasee..

Subject: Re: [MOD] BBCode Hide message with an image
Try this, it should work


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).

The Image to explain the hide message: Example of Image to show with the bbcode hide message (example)

Example Image of this hack: Hide Text with Image

In /includes/bbcode.php

FIND:
Code: [Download] [Hide] [Select]
$html = '<blockquote class="quote"><div class="quote-nouser">' . $lang['xs_bbc_hide_message'] . ':</div><div class="post-text">';


BEFORE ADD (or AFTER, if you want the image after the message explain):

Code: [Download] [Hide] [Select]
$html .= '<img src="http://Here-is-the-url-of-image.jpg" border="0"/>';

(here you can put <center> or any html code)

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/bbcb_mg.js

FIND:
Code: [Download] [Hide] [Select]
s_smiley_creator =


AFTER, ADD

Code: [Download] [Hide] [Select]
s_hide_help = 'Hide a text, the registered users must post a reply to view the hidden message: [hide]Quoted Hidden Message, which is still hidden.[/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]Quoted Hidden Message, which is still hidden.[/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]Quoted Hidden Message, which is still hidden.[/hide]";
document.post.message.focus();
return;
}
}
else if (txtarea.selectionEnd && (txtarea.selectionEnd - txtarea.selectionStart > 0))
{
//mozWrap(txtarea, "[hide]Quoted Hidden Message, which is still hidden.[/hide]");
mozInsert(txtarea, "[hide]Quoted Hidden Message, which is still hidden.[/hide]");
return;
}
if (Hide == 0)
{
ToAdd = "[hide]";
document.post.hide.src = bbcb_mg_img_path + "hide1.gif";
Hide = 1;
}
else
{
ToAdd = "[/hide]";
document.post.hide.src = bbcb_mg_img_path + "hide.gif";
Hide = 0;
}
PostWrite(ToAdd);
}


In /templates/mg_themes/bbcb_mg.tpl

FIND:

Code: [Download] [Hide] [Select]
<a href="javascript:BBChl()" ><img border="0" 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 border="0" src="{BBCB_MG_IMG_PATH}hide{BBCB_MG_IMG_EXT}" name="hide" type="image" onMouseOver="helpline('hide')" alt="Hide a message" title="Hide a message" class="bbimages" /></a>


(note: the text in alt="" and title="" must be with {language}

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

Subject: Re: [MOD] BBCode Hide Message With An Image
It doesnt work, the message comes outside the image. it doesnt cover the image up! and after posting the image doesnt go!

what should be written in {language}?

What about this for Icy phoenix??
Quote:
Optional: With this changes, we can delete the "table" of the bbcode hide explain (because with the image, this table isn't good)


Thank you.

Profile PM  
Subject: Re: [MOD] BBCode Hide message with an image
i'll test it when i arrive home... i'm sure this should work

Subject: Re: [MOD] BBCode Hide Message With An Image
Zuker wrote: [View Post]
i'll test it when i arrive home... i'm sure this should work


Ok thanx....i will wait.

Profile PM  
Subject: Re: [MOD] BBCode Hide Message With An Image
Thanks zuker, that work perfect

Profile PM  
Goto page 1, 2, 3  Next

Page 1 of 3


  
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

   

This is a "Lo-Fi" version of our main content. To view the full version with more information, formatting and images, please click here.

Powered by Icy Phoenix based on phpBB
Generation Time: 0.0897s (PHP: 28% SQL: 72%)
SQL queries: 10 - Debug Off - GZIP Enabled