Page Index Toggle Pages: 1 2 [3]  Send TopicPrint
Very Hot Topic (More than 25 Replies) Spoiler Tag V1.2 for 2.2.1 - 2.2.3 (Read 27125 times)
Jeff
God Member
*****
Offline


There are no bugs there
are only features

Posts: 2552
Joined: Jan 14th, 2005
Gender: Male
Re: Spoiler Tag V1.2 for 2.2.3
Reply #30 - Aug 12th, 2008 at 8:05pm
Print Post  
english = for
german = für
dutch = voor

Grin
  

greetings
Jeff
Back to top
WWW  
IP Logged
 
Derek Barnstorm
God Member
*****
Offline



Posts: 1146
Location: Warwickshire
Joined: Mar 23rd, 2008
Gender: Male
Re: Spoiler Tag V1.2 for 2.2.3
Reply #31 - Aug 12th, 2008 at 8:15pm
Print Post  
Thanks Jet, but I mean in yabbc.js it won't accept language variables like:

Code
Select All
<b>$post_txt{'603a'}:</b> 


So I have to hard code it like:

Code
Select All
<b>Spoiler}:</b> 


I can't seem to find the way around it...
  
Back to top
 
IP Logged
 
Elfen
New Member
*
Offline


I love YaBB 2.1

Posts: 23
Location: NYC, NY
Joined: Jan 15th, 2008
Gender: Male
Re: Spoiler Tag V1.2 for 2.2.3
Reply #32 - Aug 27th, 2008 at 7:45pm
Print Post  
Quote:
Spoiler Tag V1.2

Right, this isn't the same as the 2.1 Mod, it's a typical spoiler Show/Hide box. I have stole the button from the original Mod though, I hope he doesn't mind.
This Mod is rather simple, but it does need testing.

Description:
This Mod will allow users to hide parts of their message.

Screenshots:
http://img247.imageshack.us/img247/8091/spoiler1ls6.jpg

http://img150.imageshack.us/img150/3458/spoiler2cv4.jpg

http://img150.imageshack.us/img150/1245/spoiler3wp4.jpg

Code
Select All
[spoiler=A Film]Your Spoiler[/spoiler] 


http://img217.imageshack.us/img217/5835/spoiler4zg2.jpg

Zip Package:
SpoilerTag.mod_V_1_2
SpoilerTag_V_1_2_German_DU.mod
yabbfiles/ModImages/SpoilerTag/spoiler.gif
yabbfiles/ModImages/SpoilerTag/spoiler1.gif

Files to edit:
Admin/ModList.pl
Languages/English/Post.lng
Languages/English/InstantMessage.lng
Sources/Post.pl
Sources/YaBBC.pl
Sources/InstantMessage.pl
Sources/MyCenter.pl
Sources/Printpage.pl

yabbfiles/ubbc.js
yabbfiles/yabbc.js

Installation:

Before installing,copy 'ubbc.js' and 'yabbc.js' to cgi-bin/yabbdirectory/ - Make sure you re-upload them to their correct directory - html_root/yabbfiles.

Modify YaBB files using BoardMod or manually.
Load modified files to your server. 

Add the following code to your Style Sheet
Code
Select All
.spoiler {
	font-size: 12px;
	font-weight: normal;
	font-style: normal;
	font-family: Verdana, Helvetica, Arial, Sans-Serif;
	color: #000000;
	background-color: #CCCCCC;
	border: 1px #34689A solid;
	width: 90%;
	padding: 4px;
} 



Mod History:
1.0 - Original version - 30th July 2008
1.1 - Added to Instant Messages - 31st July 2008
1.2 - Added to Live Preview, Print Page and also added description function - 12th August 2008

I think that just about covers it... Any problems, let me know...


I hope you gave me credit for it, for if you didn't, I just will be mad...
Thanks for the help there in upgrading the mod. I have been working on a Life mod (going back to school and getting a job again) to really keep this up! Sorry to all those left in the wake of things.
  
Back to top
 
IP Logged
 
Derek Barnstorm
God Member
*****
Offline



Posts: 1146
Location: Warwickshire
Joined: Mar 23rd, 2008
Gender: Male
Re: Spoiler Tag V1.2 for 2.2.3
Reply #33 - Aug 28th, 2008 at 2:19am
Print Post  
Erm, credit for what exactly? The only spoiler tag Mod that I have found on this website is one by Kong:

http://www.boardmod.org/yabb/YaBB.pl?board=newsy2;action=display;num=1115701763

My Mod has nothing to do with that Mod... All I have stole is the button. I haven't updated anything... This is a totally new Mod... Totally different code.
  
Back to top
 
IP Logged
 
Fps_Brian
Full Member
***
Offline



Posts: 130
Location: Beach Haven
Joined: Aug 14th, 2008
Gender: Male
Re: Spoiler Tag V1.2 for 2.2.3
Reply #34 - Sep 1st, 2008 at 4:31pm
Print Post  
I have no idea what I did, but the button in the posting menu doesnt work any more on my forum... I added a few mods and worked on it for a while to fix it but sill doesnt work? the command does though!

could you help me out?
  

www.omgot.org
65+ mods installed
Back to top
IP Logged
 
Derek Barnstorm
God Member
*****
Offline



Posts: 1146
Location: Warwickshire
Joined: Mar 23rd, 2008
Gender: Male
Re: Spoiler Tag V1.2 for 2.2.3
Reply #35 - Sep 1st, 2008 at 5:12pm
Print Post  
I've PM'd you my email address, if you can zip these files up and send them to me I will have a look for you...

Admin/ModList.pl
Languages/English/Post.lng
Languages/English/InstantMessage.lng
Sources/Post.pl
Sources/YaBBC.pl
Sources/InstantMessage.pl
Sources/MyCenter.pl
Sources/Printpage.pl

yabbfiles/ubbc.js
yabbfiles/yabbc.js
  
Back to top
 
IP Logged
 
Derek Barnstorm
God Member
*****
Offline



Posts: 1146
Location: Warwickshire
Joined: Mar 23rd, 2008
Gender: Male
Re: Spoiler Tag V1.2 for 2.2.3
Reply #36 - Sep 1st, 2008 at 7:27pm
Print Post  
I've just mailed you back... I think what your problem is, is that you have uploaded 'ubbc.js' and 'yabbc.js' into your cgi-bin... You need to upload them back to your html_root/yabbfiles directory. They are only moved into the cgi-bin when installing the MOD so that BoardMod can find them.
  
Back to top
 
IP Logged
 
ccarr
Ex Member


Re: Spoiler Tag V1.2 for 2.2.3
Reply #37 - Oct 7th, 2008 at 9:03pm
Print Post  
I finally got around to installing this mod. I knew I would have to mod the mod file with having so many other mods already installed. Cheesy

This mod is way better than I thought it would be and I will definitely be using it. It's working perfectly for me.

Thanks for this mod Derek.

Are you open to suggestions for additional features??
  
Back to top
 
IP Logged
 
Derek Barnstorm
God Member
*****
Offline



Posts: 1146
Location: Warwickshire
Joined: Mar 23rd, 2008
Gender: Male
Re: Spoiler Tag V1.2 for 2.2.3
Reply #38 - Oct 7th, 2008 at 9:31pm
Print Post  
Yes, of cause I'm open to suggestions... Depending if I'm capable or not...

What was you thinking?
  
Back to top
 
IP Logged
 
ccarr
Ex Member


Re: Spoiler Tag V1.2 for 2.2.3
Reply #39 - Oct 10th, 2008 at 6:36am
Print Post  
Quote:
What was you thinking?


Thanks Derek. I think what I would have been requesting would complicate your mod and possibly I would only benefit from the additional features? So I have just edited my version to make it do what I want.

Basically I wanted to be able to only edit the text in the button so I changed the code in YaBBC.pl to use the Description in the button instead but not when the 'Hide' button is active.

I removed the text 'Spoiler' & 'for' in the language file and also the ':' in the YaBBC.pl

I hope you don't mind me doing that for my copy of your mod? Here is what I changed it to in case you think that I may be causing problems else where in the mod. I guess I will have to do something similar in the Printpage.pl

I changed the code in YaBBC.pl to this:

Code
Select All
    $message =~ s~\[spoiler\](.+?)\[/spoiler\]~<div class="message"><div style="padding-bottom: 1px;"><b>$post_txt{'603a'}</b> <input type="button" value="$post_txt{$1}" onClick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = '';		this.innerText = ''; this.value = '$post_txt{'603c'}'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = '$post_txt{'603b'}'; }"></div><div class="spoiler"><div style="display: none;">$1</div></div></div>~isg;
    $message =~ s~\[spoiler=([A-Za-z0-9# -,.]+)\](.+?)\[/spoiler\]~<div class="message"><div style="padding-bottom: 1px;"><b>$post_txt{'603a'}</b> $post_txt{'603d'} <i></i> <input type="button" value="$post_txt$1" onClick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = '';		this.innerText = ''; this.value = '$post_txt{'603c'}'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = '$post_txt$1'; }"></div><div class="spoiler"><div style="display: none;">$2</div></div></div>~isg; 



Here is how it looks in use:

http://www.eulogia.co.uk/cgi-bin/forum/YaBB.pl?num=1223620495/0#0




  
Back to top
 
IP Logged
 
Derek Barnstorm
God Member
*****
Offline



Posts: 1146
Location: Warwickshire
Joined: Mar 23rd, 2008
Gender: Male
Re: Spoiler Tag V1.2 for 2.2.3
Reply #40 - Oct 10th, 2008 at 2:39pm
Print Post  
That's absolutely fine if you prefer it that way... I'll leave the original Mod how it is, but people are welcome to modify however they like...

You'd left some code in that doesn't need to be there though... I've cleaned it up a bit here:

Code
Select All
$message =~ s~\[spoiler\](.+?)\[/spoiler\]~<div class="message"><div style="padding-bottom: 1px;"><b>$post_txt{'603a'}</b> <input type="button" value="$post_txt{$1}" onClick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = '';		this.innerText = ''; this.value = '$post_txt{'603c'}'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = '$post_txt{'603b'}'; }"></div><div class="spoiler"><div style="display: none;">$1</div></div></div>~isg;
$message =~ s~\[spoiler=([A-Za-z0-9# -,.]+)\](.+?)\[/spoiler\]~<div class="message"><div style="padding-bottom: 1px;"><input type="button" value="$1" onClick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = '';		this.innerText = ''; this.value = '$post_txt{'603c'}'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = '$1'; }"></div><div class="spoiler"><div style="display: none;">$2</div></div></div>~isg; 



  
Back to top
 
IP Logged
 
ccarr
Ex Member


Re: Spoiler Tag V1.2 for 2.2.3
Reply #41 - Oct 10th, 2008 at 3:41pm
Print Post  
That's cool   8) Thanks for this.

I don't know perl but try and figure out how the mods work. It's a bit of a hit and miss approach. Thanks for the cleaned up code.
  
Back to top
 
IP Logged
 
Derek Barnstorm
God Member
*****
Offline



Posts: 1146
Location: Warwickshire
Joined: Mar 23rd, 2008
Gender: Male
Re: Spoiler Tag V1.2 for 2.2.3
Reply #42 - Oct 14th, 2008 at 9:09pm
Print Post  
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1 2 [3] 
Send TopicPrint