Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Beta Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Details »»

Version: 1.00, by T?Pau T?Pau is offline
Developer Last Online: Jul 2006 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 02-04-2002 Last Update: Never Installs: 5
Is in Beta Stage  
No support by the author.

To make a really invisible Spoiler, just open admin/functions.php

find:

Code:
global $regexcreated,$searcharray,$replacearray,$phpversionnum

directly after that, insert the following:

Code:
,$counter
and be carefull, that you leave the ; at the end.
Then find:
Code:
 $bbcode = preg_replace("/(\[)(img)(])(\r\n)*([^\"]*)(\[\/img\])/siU", "<a href=\"\\5\" target=\"_blank\">\\5</a>", $bbcode);

    $bbcode=str_replace("\\'", "'", $bbcode);
directly after that, insert the following:
Code:
if($counter%2==0) {
      
      $bbcode = preg_replace("/(\[)(sp)(])(\r\n)*([^\"]*)(\[\/sp\])/siU", "<normalfont>Spoiler:<br></normalfont><br><font color=\"#13486D\">\\5</font>", $bbcode);
    }
    else {
    $bbcode = preg_replace("/(\[)(sp)(])(\r\n)*([^\"]*)(\[\/sp\])/siU", "<normalfont>Spoiler:<br></normalfont><br><font color=\"#1C5780\">\\5</font>", $bbcode);
}
    $bbcode=str_replace("\\'", "'", $bbcode);
You are done. Save and upload the file.
Add the Spoiler with [sp]Spoiler[/sp] in your posts.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 02-05-2002, 10:45 PM
smleg smleg is offline
 
Join Date: Dec 2001
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I dont' understand what this does...

Demo perhaps?

Thanks

Steve
Reply With Quote
  #3  
Old 02-05-2002, 11:29 PM
T?Pau T?Pau is offline
 
Join Date: Jan 2002
Posts: 12
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You can write invisible text with this, to make Spoilers that you can only see, if you mark the text.
It just writes the text in the same color than the background color.
have a look at the images:
invisible
visible
Reply With Quote
  #4  
Old 02-06-2002, 12:39 PM
T?Pau T?Pau is offline
 
Join Date: Jan 2002
Posts: 12
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

First Bugfix just after one day
Found out, that if you try to place other vbcode within the spoiler, it doesn`t work anymore.
This is how to fix it:
Code:
if($counter%2==0) {
      
      $bbcode = preg_replace("/(\[)(sp)(])(\r\n)*(.*)(\[\/sp\])/siU", "<normalfont>Spoiler:</normalfont><br><font color=\"#13486D\">\\5</font>", $bbcode);
    }
    else {
    $bbcode = preg_replace("/(\[)(sp)(])(\r\n)*(.*)(\[\/sp\])/siU", "<normalfont>Spoiler:</normalfont><br><font color=\"#1C5780\">\\5</font>", $bbcode);
}
Now you can use other codes and smilies within the Spoiler, but they will be displayed normaly. The spoiler text stays invisible.

Instead of the colors
Code:
<font color=\"#13486D\">
and
<font color=\"#1C5780\">
use
Code:
{ firstaltcolor }
and 
{ secondaltcolor } without the spaces.
Reply With Quote
  #5  
Old 02-06-2002, 01:30 PM
XiXora's Avatar
XiXora XiXora is offline
 
Join Date: Nov 2001
Location: Birmingham, UK
Posts: 37
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

you can add theses in BB code neway i think
Reply With Quote
  #6  
Old 02-06-2002, 01:49 PM
TWTCommish's Avatar
TWTCommish TWTCommish is offline
 
Join Date: Oct 2001
Location: Pittsburgh, PA, USA
Posts: 783
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I've got a [spoiler] tag on my board. No hack required, really.
Reply With Quote
  #7  
Old 02-06-2002, 02:19 PM
T?Pau T?Pau is offline
 
Join Date: Jan 2002
Posts: 12
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default


How did you give the spoiler text the same color, as the background color in all styles?
I have styles with black, gray and orange background colors and if I make the spoiler text black it is easy to read in the other styles with the gray and orange background color.
Mine works for all styles and gets the colors right, so that it is really invisible in all the styles.
Reply With Quote
  #8  
Old 02-06-2002, 02:23 PM
TWTCommish's Avatar
TWTCommish TWTCommish is offline
 
Join Date: Oct 2001
Location: Pittsburgh, PA, USA
Posts: 783
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It's simple: you stick it in a box with it's own BG color. Watch (first post):

http://www.movieforums.net/showthread.php?threadid=1731

I've tried to implement a JS to highlight it automatically, but keep on running into problems.
Reply With Quote
  #9  
Old 02-06-2002, 02:29 PM
T?Pau T?Pau is offline
 
Join Date: Jan 2002
Posts: 12
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Saw it
But what about different styles? Does it always look the same, or is the color changed in different styles?
Reply With Quote
  #10  
Old 02-06-2002, 02:31 PM
TWTCommish's Avatar
TWTCommish TWTCommish is offline
 
Join Date: Oct 2001
Location: Pittsburgh, PA, USA
Posts: 783
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nope, looks the same. I don't use different styles anyway...but even if I did, the gray-on-gray would still work alright.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:33 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.07403 seconds
  • Memory Usage 2,296KB
  • Queries Executed 23 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (7)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete