News:

Wondering if this will always be free?  See why free is better.

Main Menu

Can anyone help me create custom BBCodes?

Started by Bruce Banner, November 25, 2014, 08:26:51 PM

Previous topic - Next topic

Bruce Banner

I'm switching my board to SMF from phpBB, and whereas it was easy to create custom BBCodes in phpBB, I just cannot for the life of me figure out all the complicated code needed to do it in SMF.  Arrays and types and $1s.  It's too much for me.  I've got a load of BBCodes that work fine on my phpBB board but I really need help switching them over.  Thanks.

Arantor


Bruce Banner

Quote from: Arantor on November 25, 2014, 08:40:59 PM
Such as?

Well the first one I need help with is for embedding HTML5 audio, but I've been Googling and it seems like HTML5 isn't supported on SMF.

Arantor

To a point, yes. SMF 2.0 uses XHTML 1.0, not HTML5 (because when 2.0's theme was designed, HTML5 didn't exist). You *can* use <audio> tags, but search engines might not like it because it's not technically valid XHTML (but most browsers/users won't care). Though there are ways this can be dealt with if the mod author is careful.

It really would be easier if you just outlined what you were looking for in detail rather than in bits and pieces, just because I don't mind building these things, but if I have to keep asking to get information, it's going to eat up what time I do have available for such things...

Bruce Banner

Quote from: Arantor on November 25, 2014, 08:50:46 PM
To a point, yes. SMF 2.0 uses XHTML 1.0, not HTML5 (because when 2.0's theme was designed, HTML5 didn't exist). You *can* use <audio> tags, but search engines might not like it because it's not technically valid XHTML (but most browsers/users won't care). Though there are ways this can be dealt with if the mod author is careful.

It really would be easier if you just outlined what you were looking for in detail rather than in bits and pieces, just because I don't mind building these things, but if I have to keep asking to get information, it's going to eat up what time I do have available for such things...

OK, no problem.

Probably gonna take a while to type out all of what I need, so apologies in advance.  I'll just copy out the BBCodes I'm currently using in code boxes.

snake_ripken

for custom bb c there is mods that allow people to add them
look in mod section
http://custom.simplemachines.org/mods/index.php?action=search;basic_search=custom+bbc
i use personal bbc last one on list which work good for me but others are availalbe


Bruce Banner

1. [AltQuote]{TEXT}[/AltQuote]

<div style="border: 1px solid black; padding: 10px; background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);">{TEXT}</div>

2. [Edited]{TEXT}[/Edited]

<div style=" background-color: #B5C7CE; -moz-border-radius: 10px; -webkit-border-radius: 10px; border: 1px solid #666; padding: 4px;" ><strong>Edit: </strong>{TEXT}</div>

3. [FLV]{URL1} {URL2} {NUMBER1} {NUMBER2}[/FLV]

<center><embed src="http://www.gdd.ro/gdd/flvplayer/gddflvplayer.swf" flashvars="?&autoplay=false&loop=false&splashscreen={URL2}&sound=100&buffer=2&vdo={URL1}" width="{NUMBER1}" height="{NUMBER2}" allowFullScreen="true" quality="best" wmode="transparent" allowScriptAccess="always"  pluginspage="http://www.macromedia.com/go/getflashplayer"  type="application/x-shockwave-flash"></embed></center>

4. [Float={IDENTIFIER}]{TEXT}[/Float]

<div style="float:{IDENTIFIER}; padding:10px;">{TEXT}</div>

5. [Google]{INTTEXT}[/Google]

<input class="button2 btnlite" type="button" value="Google: {INTTEXT}" onclick="window.open('http://www.google.com/search?q={INTTEXT}')" />

6. [HTML5Audio]{URL1} {URL2} {URL3}[/HTML5Audio]

<center><audio controls>
  <source src="{URL1}" type="audio/mpeg">
  <source src="{URL2}" type="audio/ogg">
  <source src="{URL3}" type="audio/wav">
Your browser does not support the audio tag.
</audio></center>


With options for autoplay, loop, and mute.

7. [HTML5Video]{URL1} {URL2} {URL3} {URL4} {NUMBER1} {NUMBER2}[/HTML5Video]

<center><video width="{NUMBER1}" height="{NUMBER2}" controls poster="{URL1}">
  <source src="{URL2}" type="video/mp4">
  <source src="{URL3}" type="video/ogg">
  <source src="{URL4}" type="video/webm">
Your browser does not support the video tag.
</video></center>


With options for autoplay, loop, and mute.

8. [Hili]{TEXT}[/Hili]

<span style="background-color: #FFFF00">{TEXT}</span>

9. [ImgButton]{URL2}, {URL}, {TEXT}[/ImgButton]

<a href="{URL2}" target="_blank">
    <button>
    <img src="{URL}" alt="{URL}" align="absmiddle" />
    <strong>{TEXT}</strong>
    </button>
</a>


10. [ImgCaption]{URL},{SIMPLETEXT}[/ImgCaption]

<img src="{URL}" alt="{SIMPLETEXT}" title="{SIMPLETEXT}" />

11. [Justify]{TEXT}[/Justify]

<div style="text-align: justify;">{TEXT}</div>

12. [Legend={TEXT1}]{TEXT2}[/Legend]

<fieldset style="width: auto; border: 1px solid #008000; padding: 10px;">
    <legend style="border: 1px solid #008000; padding: 4px; color: #0000BF;">
<b>{TEXT1}</b></legend>{TEXT2}</fieldset>


13. [LinkButton]{INTTEXT},{URL}[/LinkButton]

<input class="button2 btnlite" type="button" value="{INTTEXT}" onclick="window.open('{URL}', '_blank')" title="{URL}" />

14. [MediaCrushAudio]{URL}[/MediaCrushAudio]

<center><iframe src="{URL}/frame" frameborder="0" allowFullscreen width="500" height="26"></iframe></center>

15. [MediaCrushVideo]{URL},{NUMBER1},{NUMBER2}[/MediaCrushVideo]

<center><iframe src="{URL}/frame" frameborder="0" allowFullscreen width="{NUMBER1}" height="{NUMBER2}"></iframe></center>

16. [OffTopic]{TEXT}[/OffTopic]

<span style="color:#114499; font-weight:bold; font-style:italic;">Off topic:</span><br /><span style="color:#2277DD; font-style:italic;">{TEXT}</span>

17. [Scroll]{TEXT}[/Scroll]

<div style="width: auto; height:300px; background:#FFFFFF; overflow:auto; border:1px solid #000000; padding:8px;">{TEXT}</div>

18. [Spoiler]{TEXT}[/Spoiler]

<div style="margin:20px; margin-top:5px"><div class="quotetitle"><input class="button2 btnlite" type="button" value="Spoiler" style="text-align:center;width:100px;margin:0px;padding:0px;" 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 = 'Hide'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = 'Spoiler'; }" /></div><div class="quotecontent"><div style="display: none;">{TEXT}</div></div></div>

19. [Tab]{SIMPLETEXT}[/Tab]

<span style="margin-left: {SIMPLETEXT}px;"></span>

20. [Thumbnail]{URL}[/Thumbnail]

<a href="{URL}" target="_blank"><img style="max-width:200px; max-height; 200px;" src="{URL}" alt="Image" /></a>

21. [Tooltip={INTTEXT}]{TEXT}[/Tooltip]

<a title="{INTTEXT}" class="postlink" style="cursor: help;">{TEXT}</a>

22. [Wikipedia]{INTTEXT}[/Wikipedia]

<input class="button2 btnlite" type="button" value="Wikipedia: {INTTEXT}" onclick="window.open('http://en.wikipedia.org/wiki/{INTTEXT}')" />

That's it, I think.

I also need to know how to convert the html embed code from any video site into an smf bbcode.

Thanks.

Bruce Banner

#7
Quote from: snake_ripken on November 25, 2014, 08:56:45 PM
for custom bb c there is mods that allow people to add them
look in mod section
http://custom.simplemachines.org/mods/index.php?action=search;basic_search=custom+bbc
i use personal bbc last one on list which work good for me but others are availalbe

Thanks.

EDIT: Oh wow.  That actually might make this a whole lot easier.  THANKS!

EDIT: Serious problem.  I tried installing this mod, http://custom.simplemachines.org/mods/index.php?mod=3699 but it didn't work, because it doesn't say where I should put the add_remove_hooks.php and edit_db.php files.

Kindred

Ummm....  Mod you used the package manager, all of the file edits, the new files and the install scripts would run themselves and you have no need to decide where to put anything
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

snake_ripken

i dont use that mod so dont know but you can ask mod author in his mod post for support
for the one i use can have the code you posted but need to be changed {content} insted of {TEXT}
and {option} or {option1} {option2} for other stuff but you need to ask those mod writers
in there mod threds for support if you dont understand how to use

Bruce Banner

Quote from: Kindred on November 26, 2014, 12:04:09 AM
Ummm....  Mod you used the package manager, all of the file edits, the new files and the install scripts would run themselves and you have no need to decide where to put anything

Thanks.  Tried to use the package manager but it didn't work, so uploaded it manually with FileZilla and everything's working fine now.

Bruce Banner

Quote from: snake_ripken on November 26, 2014, 12:16:36 AM
i dont use that mod so dont know but you can ask mod author in his mod post for support
for the one i use can have the code you posted but need to be changed {content} insted of {TEXT}
and {option} or {option1} {option2} for other stuff but you need to ask those mod writers
in there mod threds for support if you dont understand how to use

Thanks.  All seems to be working fine now.

Kindred

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Bruce Banner

Quote from: Kindred on November 26, 2014, 06:28:44 AM
what do you mean "it didn't work"?

It just didn't seem to show up at all when I tried uploading it manually.  But it showed up fine when I installed it with FileZilla.  I've now uninstalled it now anyway because it didn't work the way I assumed it would.

Kindred

you don't upload things manually...

use the package manager to upload the mod to your site
http://wiki.simplemachines.org/smf/SMF2.0:Package_manager

and them APPLY the mod.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Bruce Banner

Quote from: Kindred on November 26, 2014, 08:02:57 AM
you don't upload things manually...

use the package manager to upload the mod to your site
http://wiki.simplemachines.org/smf/SMF2.0:Package_manager

and them APPLY the mod.

Well I did, but as I said, I've now uninstalled that mod anyway because it was too difficult to figure out how to use properly.

Deaks

Bruce Banner, do you still need assistance or did you turn into the hulk and smash your forum up?
~~~~
Former SMF Project Manager
Former SMF Customizer

"For as lang as hunner o us is in life, in nae wey
will we thole the Soothron tae owergang us. In truth it isna for glory, or wealth, or
honours that we fecht, but for freedom alane, that nae honest cheil gies up but wi life
itsel."

Advertisement: