The part i'm having trouble with is getting the right replacement for the tags
Code: Select all
$patterns[] = "#\[spoiler\]([:a-z\\./_\-0-9%~]+){1}(\?[a-z=_\-0-9&;~]*)?\[/spoiler\]#mi";
$replacements[] = '<div class="spoiler" style="padding: 3px;" align="center" width="100%"><a href="javascript://" OnClick="javascript: layerVis(\''.$rnd.'\', 1);">Reveal Spoiler</a><div align="left" id="'.$rnd.'" style="visibility: hidden;">\1</div></div>';The reveal spoiler part comes up but nothing else.
Here's the source code of that part in the page produced
Code: Select all
<div class="spoiler" style="padding: 3px;" align="center" width="100%"><a href="javascript://" OnClick="javascript: layerVis('',
1);">Reveal Spoiler</a><div align="left" id="" style="visibility: hidden;">Text</div></div>I should probably add that i know next to nothing about PHP and that i'm only starting to learn by adding hacks and modifications to my forum.
JCART | Please use
Code: Select all
tags when posting php code. Review [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]