Show bbcode icon in custom bbcode page!

Post your own Mods, Snippets, Tutorials here. Share what you got
There is no support here! Only Read Access!
Forum rules
User contributions are the users own "Stuff"
They are not supported by the BBCode Staff and is used at own risk
Locked
cisco007
BBCoder VI
BBCoder VI
Posts: 1015
Joined: 16 Mar 2010, 18:14
Location: Don't really know!

Show bbcode icon in custom bbcode page!

Post by cisco007 »

this little snippet shows an icon on the right side of the custom bbcodes page, according to the bbcode installed on your board!

DEMO:
[hsimg]http://img291.imageshack.us/img291/9923 ... 412799.png[/hsimg]

REQUIREMENTS:
1.You must have custom bbcode page by Stoker found in this site. viewtopic.php?f=8&t=355
2.If you have bbcodebox light mod installed it will also help, i have my images for the bbcodebox light mod, in a editor directory inside the images folder!
ps. fix path to images depending on where you have them installed.
3.Images should be named according to the bbcode, follow instructions in the bbcodebox light topic!

on to edits!

open boardbbcodes.php

Find:

Code: Select all

      'BBCODE_MATCH'   => $row['bbcode_match'],
Add after:

Code: Select all

	  'BBCODE_ICON'	   => ($row['bbcode_tag']) ? '<img src="' . $phpbb_root_path . 'images/editor/' . $row['bbcode_tag'] . '.png" height="16" width="16" align="absmiddle" />' : '<img src="' . $phpbb_root_path . 'images/editor/no_image.png'. '" height="16" width="16" align="absmiddle" />',
now open prosilver/template/boardbbcodes_body.html
Find:

Code: Select all

          <th class="info" style="width:150px;">{L_BBCODE_DISPLAY}</th>
Add after:

Code: Select all

          <th class="table1" style="text-align:center;">{L_BBCODE_ICON}</th>
Find:

Code: Select all

          <td style="text-align:center;"><!-- IF bbcodes.S_BBCODE_DISPLAY -->{L_YES}<!-- ELSE -->{L_NO}<!-- ENDIF --></td>
Add after:

Code: Select all

<td style="text-align:center;">{bbcodes.BBCODE_ICON}</td>
open language/en/common.php
Find:

Code: Select all

    'BBCODES_COUNT'     => '%d Custom BBCodes'
Add after:

Code: Select all

    'BBCODE_ICON'     			=> 'Icon',
User avatar
Stoker
Site Admin
Site Admin
Posts: 3536
Joined: 12 May 2008, 23:26
BBCodes: 239
Favourite BBCode: Anipro
Favourite MOD: PrettyPhoto
Location: Denmark
Contact:

Re: Show bbcode icon in custom bbcode page!

Post by Stoker »

Nice cisco :thumb:
Board rules! No PM support
cisco007
BBCoder VI
BBCoder VI
Posts: 1015
Joined: 16 Mar 2010, 18:14
Location: Don't really know!

Re: Show bbcode icon in custom bbcode page!

Post by cisco007 »

thanks, i was going to post it either in the snippets or in the custom bbcodes page topic, but i figured it would be better here!
User avatar
GHOSTWRiTAZ
BBCoder II
BBCoder II
Posts: 20
Joined: 28 May 2010, 01:09

Re: Show bbcode icon in custom bbcode page!

Post by GHOSTWRiTAZ »

Very nice cisco tnx for sharing m8
User avatar
Chalong
BBCoder II
BBCoder II
Posts: 59
Joined: 06 Mar 2010, 14:03
Location: Pforzheim / Germany
Contact:

Re: Show bbcode icon in custom bbcode page!

Post by Chalong »

Looks nice and I'd like to install.
cisco007 wrote:open language/en/mods/bbcodes.php
There is no file like that in language/en/mods/, neither in the de folder. :oops:
Which mod does that come from ?
Last edited by Chalong on 24 Jul 2010, 16:15, edited 1 time in total.
Regards Chalong

www.chalong.de
cisco007
BBCoder VI
BBCoder VI
Posts: 1015
Joined: 16 Mar 2010, 18:14
Location: Don't really know!

Re: Show bbcode icon in custom bbcode page!

Post by cisco007 »

you are right, i had created my own bbcodes.php language file and forgot about it!, because i did not like adding too many language variables to the common.php!

FIRST POST UPDATED!
User avatar
Chalong
BBCoder II
BBCoder II
Posts: 59
Joined: 06 Mar 2010, 14:03
Location: Pforzheim / Germany
Contact:

Re: Show bbcode icon in custom bbcode page!

Post by Chalong »

Thank you, cisco007.
Regards Chalong

www.chalong.de
ejchu01
BBCoder I
BBCoder I
Posts: 1
Joined: 16 Aug 2010, 20:07

Re: Show bbcode icon in custom bbcode page!

Post by ejchu01 »

nice cisco!

how did you make that demo where i click the thumbnail and the full sized picture shows up?
User avatar
Stoker
Site Admin
Site Admin
Posts: 3536
Joined: 12 May 2008, 23:26
BBCodes: 239
Favourite BBCode: Anipro
Favourite MOD: PrettyPhoto
Location: Denmark
Contact:

Re: Show bbcode icon in custom bbcode page!

Post by Stoker »

ejchu01 » 16 Aug 2010, 23:19 wrote:nice cisco!

how did you make that demo where i click the thumbnail and the full sized picture shows up?
Here: viewtopic.php?f=8&t=13
Board rules! No PM support
Locked