• Login
  • Register
  • Dolphin Forums
  • Home
  • FAQ
  • Download
  • Wiki
  • Code


Dolphin, the GameCube and Wii emulator - Forums › Dolphin Emulator Discussion and Support › Support v
« Previous 1 ... 1059 1060 1061 1062 1063 ... 1189 Next »

Spoiler ? Blank Space ?
View New Posts | View Today's Posts

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Thread Modes
Spoiler ? Blank Space ?
03-16-2010, 07:37 PM
#1
Chacker Offline
.
***
Posts: 74
Threads: 7
Joined: Jul 2009
Question 
Does someone know how to make a spoiler ?
Does someone know how to make blank space that doesn't get compressed ?
I tried so much codes, are some codes disabled on this forum Huh
[color=#FFA500]Specs[/color]: Windows Vista x64
2x 1GB Corshair DDR2 Ram
Intel Core 2 Duo E6750 [color=#32CD32]@[/color] 2,76GHz
Nvidia Geforce GTX 560 TI

Find
Reply
03-16-2010, 08:27 PM
#2
Ocean Offline
Senior Member
*******
Posts: 1,209
Threads: 39
Joined: Jan 2010
Hide tags aren't a default function in MyBB boards. The forum admin would have to mod it with a filter which are commonly found under GNU license. One such is below.

PHP Code:
<?php
$plugins
->add_hook("parse_message", "spoiler_run");
}
function 
spoiler_activate()
{
}
function 
spoiler_deactivate()
{
}
function 
spoiler_run($message)
{
    
$pattern = array("#\[spoiler=(?:&quot;|\"|')?(.*?)[\"']?(?:&quot;|\"|')?\](.*?)\[\/spoiler\](\r\n?|\n?)#si", "#\[spoiler\](.*?)\[\/spoiler\](\r\n?|\n?)#si");

    
$replace = array("<div><div class=\"quote_header\">$1 <a href=\"javascript:void(0);\" onclick=\"javascript:if(parentNode.parentNode.getElementsByTagName('div')[1].style.display=='block'){parentNode.parentNode.getElementsByTagName('div')[1].style.display='none';this.innerHTML='(Click to View)';}else {parentNode.parentNode.getElementsByTagName('div')[1].style.display='block';this.innerHTML='(Click to Hide)';}\">(Click to View)</a></div><div class=\"quote_body\" style=\"display: none;\">$2</div></div>", "<div><div class=\"quote_header\">Spoiler <a href=\"javascript:void(0);\" onclick=\"javascript:if(parentNode.parentNode.getElementsByTagName('div')[1].style.display=='block'){parentNode.parentNode.getElementsByTagName('div')[1].style.display='none';this.innerHTML='(Click to View)';}else {parentNode.parentNode.getElementsByTagName('div')[1].style.display='block';this.innerHTML='(Click to Hide)';}\">(Click to View)</a></div><div class=\"quote_body\" style=\"display: none;\">$1</div></div>");

    while(
preg_match($pattern[0], $message) or preg_match($pattern[1], $message))
    {
        
$message = preg_replace($pattern, $replace, $message);
    }
    
$find = array(
        
"#<div class=\"quote_body\">(\r\n?|\n?)#",
        
"#(\r\n?|\n?)</div>#"
    
);

    
$replace = array(
        
"<div class=\"quote_body\">",
        
"</div>"
    
);
    
$message = preg_replace($find, $replace, $message);
    return 
$message;
}
?>
[Image: 1678862.png]
[Image: 2qbcgw2.jpg]
Find
Reply
« Next Oldest | Next Newest »


  • View a Printable Version
  • Subscribe to this thread
Forum Jump:


Users browsing this thread: 1 Guest(s)



Powered By MyBB | Theme by Fragma

Linear Mode
Threaded Mode