Page 1 of 1

Show bbcode icon in custom bbcode page!

Posted: 23 Jul 2010, 22:42
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',

Re: Show bbcode icon in custom bbcode page!

Posted: 23 Jul 2010, 23:03
by Stoker
Nice cisco :thumb:

Re: Show bbcode icon in custom bbcode page!

Posted: 23 Jul 2010, 23:07
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!

Re: Show bbcode icon in custom bbcode page!

Posted: 23 Jul 2010, 23:54
by GHOSTWRiTAZ
Very nice cisco tnx for sharing m8

Re: Show bbcode icon in custom bbcode page!

Posted: 24 Jul 2010, 16:14
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 ?

Re: Show bbcode icon in custom bbcode page!

Posted: 24 Jul 2010, 16:30
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!

Re: Show bbcode icon in custom bbcode page!

Posted: 24 Jul 2010, 17:07
by Chalong
Thank you, cisco007.

Re: Show bbcode icon in custom bbcode page!

Posted: 16 Aug 2010, 23:19
by ejchu01
nice cisco!

how did you make that demo where i click the thumbnail and the full sized picture shows up?

Re: Show bbcode icon in custom bbcode page!

Posted: 16 Aug 2010, 23:23
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