Page 107 of 267
Re: Custom BBCodes
Posted: Tue Nov 18, 2008 12:49 am
by sakm
i have got a problem with the spoiler BBcode
when a member uses it everything that is written in the post in the spoiler out the spoiler and even their signiture all the text is made bigger

any ideas ???
here is the spoiler code
Code: Select all
</span>
<div class="spoiltitle"><input class="spoilbtn" type="button" value="Show Spoiler" onClick="javascript: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 = 'Hide Spoiler'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = 'Show Spoiler'; }" onfocus="this.blur();">
</div>
<div class="spoildiv">
<div style="display: none;">{TEXT}</div>
</div>
<span class="postbody">
thanks stu
Re: Custom BBCodes
Posted: Tue Nov 18, 2008 10:06 am
by nicholas.alipaz
ulong wrote:Is it possible to replace [you] with /you ?
I mean without closing tag/bbcode, just only openning tag [you]
Only if you have access to make an edit within your database.
let me know.
Re: Custom BBCodes
Posted: Tue Nov 18, 2008 10:12 am
by nicholas.alipaz
CAPITALIZE the parts that say {text#}, I think that will fix it.
Re: Custom BBCodes
Posted: Tue Nov 18, 2008 3:56 pm
by wordeebird
Any thoughts on embedding an mp4 that I'm hosting myself? I still can't figure it out...
Re: Custom BBCodes
Posted: Tue Nov 18, 2008 11:03 pm
by sakm
sakm wrote:i have got a problem with the spoiler BBcode
when a member uses it everything that is written in the post in the spoiler out the spoiler and even their signiture all the text is made bigger

any ideas ???
here is the spoiler code
Code: Select all
</span>
<div class="spoiltitle"><input class="spoilbtn" type="button" value="Show Spoiler" onClick="javascript: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 = 'Hide Spoiler'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = 'Show Spoiler'; }" onfocus="this.blur();">
</div>
<div class="spoildiv">
<div style="display: none;">{TEXT}</div>
</div>
<span class="postbody">
thanks stu
anyone ??

Re: Custom BBCodes
Posted: Wed Nov 19, 2008 1:56 pm
by Elyaradine
Hi there.
Photobucket automatically generates thumbnails for the images you upload, and prefixes the file name with a "th_". Photobucket can automatically generate the thumbnail links for forums for you, but a lot of people don't seem to have that set, and they post large versions of images instead.
The Problem: The BBCode below works sometimes, but not all of the time, and I can't figure out why.
BBCode:
Code: Select all
[pb]{URL}/{IDENTIFIER1}.{IDENTIFIER2}[/pb]
HTML Replacement:
Code: Select all
<a class="postlink" href="{URL}/{IDENTIFIER1}.{IDENTIFIER2}"><img src="{URL}/th_{IDENTIFIER1}.{IDENTIFIER2}" /></a>
This example works:
Code: Select all
[pb]http://i166.photobucket.com/albums/u89/Elyaradine/beans.jpg[/pb]
This example does NOT work:
Code: Select all
[pb]http://i97.photobucket.com/albums/l224/AmandaLemmer/candlecopy.jpg[/pb]
Furthermore, if I include both of the examples above (i.e. one working, and one not working) in the same post, the post comes up blank. I've tested this on a vanilla install.
Any help would be greatly appreciated.
Re: Custom BBCodes
Posted: Wed Nov 19, 2008 4:57 pm
by Lumpy Burgertushie
for one thing th_candlecopy.jpg does not exist at photobucket.
robert
Re: Custom BBCodes
Posted: Wed Nov 19, 2008 5:08 pm
by -Kenichi-
Hi,
It has already been ask several times, but I could find it in these topics.
What's the bbcode for [you]?
I really want that one.
You can also answer me by a pm if you want.
Thanx.
Kenichi
Re: Custom BBCodes
Posted: Wed Nov 19, 2008 5:11 pm
by Elyaradine
Lumpy Burgertushie wrote:for one thing th_candlecopy.jpg does not exist at photobucket.
robert
It does, from what I can see.

Unless what I'm seeing is a cached image, which it shouldn't be.
This is what should appear:

Re: Yet another Youtube BBCode
Posted: Wed Nov 19, 2008 7:38 pm
by molgan
nicholas.alipaz wrote:I have seen tons of threads and code for posting youtube videos via bbcode. None of the ones I have ever seen seemed satisfactory.
I wrote one of my own, the bbcode is as simple as it can get and the code will accept any form of youtube url accept the actual embed code.
here it is:
For the BBCode the user may do any of the following and the video will be embedded properly:
Code: Select all
[youtube]http://xxx.youtube.com/watch?v=xxxxxxxxxx[/youtube]
Code: Select all
[youtube]http://xxx.youtube.com/v/xxxxxxxxxx[/youtube]
Where: xxx stands for the subdomain (www, or alternate) and xxxxxxxxxx is the id of the video.
Her is what you put in your ACP:
BBCode usage
HTML replacement
Code: Select all
<script type="text/javascript">
function ytubeGo() {
var ytubeVal = "{TEXT}";
if(ytubeVal.match("watch")) { //http://www.youtube.com/watch?v=xxxxxxxxxx
var ytubeId = ytubeVal.indexOf("v=");
ytubeId = ytubeId+2;
ytubeId = ytubeVal.slice(ytubeId);
var doMain = ytubeVal.indexOf("watch");
doMain = ytubeVal.slice(0,doMain);
document.write("<object width=\"425\" height=\"344\"><param name=\"movie\" value=\""+doMain+"v/"+ytubeId+"&hl=en&fs=1\"></param><param name=\"allowFullScreen\" value=\"true\"></param><param name=\"allowscriptaccess\" value=\"always\"></param><embed src=\""+doMain+"v/"+ytubeId+"&hl=en&fs=1\" type=\"application/x-shockwave-flash\" allowscriptaccess=\"always\" allowfullscreen=\"true\" width=\"425\" height=\"344\"></embed></object>");
}
else if (ytubeVal.match("v/")) { //http://www.youtube.com/v/xxxxxxxxxx
var ytubeId = ytubeVal.indexOf("v/");
ytubeId = ytubeId+2;
ytubeId = ytubeVal.slice(ytubeId);
var doMain = ytubeVal.indexOf("v/");
doMain = ytubeVal.slice(0,doMain);
document.write("<object width=\"425\" height=\"344\"><param name=\"movie\" value=\""+doMain+"v/"+ytubeId+"&hl=en&fs=1\"></param><param name=\"allowFullScreen\" value=\"true\"></param><param name=\"allowscriptaccess\" value=\"always\"></param><embed src=\""+doMain+"v/"+ytubeId+"&hl=en&fs=1\" type=\"application/x-shockwave-flash\" allowscriptaccess=\"always\" allowfullscreen=\"true\" width=\"425\" height=\"344\"></embed></object>");
}
else { //just the id xxxxxxxxx
ytubeId = ytubeVal;
document.write("<object width=\"425\" height=\"344\"><param name=\"movie\" value=\"http://www.youtube.com/v/"+ytubeId+"&hl=en&fs=1\"></param><param name=\"allowFullScreen\" value=\"true\"></param><param name=\"allowscriptaccess\" value=\"always\"></param><embed src=\"http://www.youtube.com/v/"+ytubeId+"&hl=en&fs=1\" type=\"application/x-shockwave-flash\" allowscriptaccess=\"always\" allowfullscreen=\"true\" width=\"425\" height=\"344\"></embed></object>");
}
}
ytubeGo();
</script>
Help line
Place the video's url between the tags, doesn't really matter which format, we'll take care of the rest
I hope someone can get some use out of that.
Great !
BUt I can´t get this to work with subdomains ex.
[youtube]
http://se.youtube.com/watch?v=xxxxxxxx[/youtube]
Re: Yet another Youtube BBCode
Posted: Thu Nov 20, 2008 4:12 am
by nicholas.alipaz
I tried an url from that domain. it is working on my site. Could you provide a copy/paste of what you have in your bbcode tag in the ACP?
Additionally, you need to be sure you have javascript enabled in your browser. If your browser blocks scripts you won't be able to see the video.
Re: Custom BBCodes
Posted: Thu Nov 20, 2008 4:17 am
by nicholas.alipaz
sakm wrote:sakm wrote:i have got a problem with the spoiler BBcode
...
thanks stu
anyone ??

If a user is experiencing an issue with that spoiler, it is most likely because their browser blocks javascript. It works fine the way you posted it.
The only alternative would be to use a css spoiler rather than javascript. But someone would need to right one. I think I wrote one, but it doesn't do exactly what that one does.
Re: Custom BBCodes
Posted: Thu Nov 20, 2008 4:32 am
by nicholas.alipaz
-Kenichi- wrote:Hi,
It has already been ask several times, but I could find it in these topics.
What's the bbcode for [you]?
I really want that one.
You can also answer me by a pm if you want.
Thanx.
Kenichi
I can't find it in here either. I wrote my own, but it requires one addition to your overall_header.html file
Here it is:
- OPEN /styles/<yourstyle>/template/overall_header.html
FIND
ADD AFTER
Code: Select all
<span id="phpbb3uname" style="display:none;">{S_USERNAME}</span>
Save, close, upload to server, Go to ACP -> Styles -> Templates and refresh your templates
Go to ACP -> Posting and add new bbcode:
BBCode usage
HTML replacement
Code: Select all
<script type="text/javascript">
var uname=document.getElementById("phpbb3uname").innerHTML;
document.write(uname);
</script>
It works, but it requires the user to allow javascript.
Re: Custom BBCodes
Posted: Thu Nov 20, 2008 8:03 am
by Elyaradine
nicholas.alipaz wrote:The only alternative would be to use a css spoiler rather than javascript. But someone would need to right one. I think I wrote one, but it doesn't do exactly what that one does.
I use a CSS one on my site. Less fuss, and very easy, but it (obviously) won't hide text if the person has CSS disabled.
BBCode:
HTML Replacement:
Code: Select all
<span style="background:#000000; color:#000000">{TEXT}</span>
Re: Custom BBCodes
Posted: Thu Nov 20, 2008 10:41 am
by sakm
nicholas.alipaz wrote:sakm wrote:sakm wrote:i have got a problem with the spoiler BBcode
...
thanks stu
anyone ??

If a user is experiencing an issue with that spoiler, it is most likely because their browser blocks javascript. It works fine the way you posted it.
The only alternative would be to use a css spoiler rather than javascript. But someone would need to right one. I think I wrote one, but it doesn't do exactly what that one does.
when any member uses it his/her text in the post is made bigger not just for him everyone can see that no matter what browser they are using