[MOD] Advanced BBCode Box 5.0.0a-6

This forum contains member submitted mods and hacks for IntegraMOD/IM Portal versions

*please read the "Read Me" post*

Moderator: Integra Moderator

PostAuthor: Skywalker » Wed May 24, 2006 11:38 pm

"sanji";p="7220" wrote:First of all - and even if already everyone said so - I'd like to say that this mod is really great. It makes posting of more complex messages much easier. A great addition to IM.

Even more fantastic would be the possibility to control which buttons are displayed from the ACP. But this might be a little difficult to implement.

Therefore, I wonder if there was a simple way to remove some of the buttons for normal users, but leave them for example for moderators or administrators. The function does not need to be blocked for normal users, but if the icone itself would not be displayed, that would be enough.

Is that possible (I mean, not too difficult)?

Thanks,

sanji


use this mod and place the images you want to hide from normal users between the code in the tpl...

Code: Select all
 # #-----[ OPEN ]------------------------------------------ #  includes/page_header.php  # #-----[ FIND ]------------------------------------------ #  $template->assign_block_vars('switch_user_logged_in', array());  # #-----[ AFTER, ADD ]------------------------------------------ #  // Admin Only View Mod       if ( $userdata['user_level'] == ADMIN )    {       $template->assign_block_vars('switch_admin_view_only', array());    } // Admin Only View Mod  // Mod Only View Mod         if ( $userdata['user_level'] == MOD )    {       $template->assign_block_vars('switch_mod_view_only', array());    } // Mod Only View Mod  // Mod Only View Admin & Mod           if ( $userdata['user_level'] == ADMIN || $userdata['user_level'] == MOD )      {         $template->assign_block_vars('switch_admin_and_mod_view_only', array());      }  // Mod Only View Admin & Mod  # #-----[ OPEN ]------------------------------------------ ### templates/subSilver/**file_you_want_to_place_swicth_in**.tpl  # #-----[ FIND ]------------------------------------------ ## The code you want to remain hidden from everyone except Administrators  # #-----[ BEFORE **CODE**, ADD ]------------------------------------------ #  <BEGIN>    # #-----[ AFTER **CODE**, ADD ]------------------------------------------ #  <END>  # #-----[ FIND ]------------------------------------------ ## The code you want to remain hidden from everyone except moderators  # #-----[ BEFORE **CODE**, ADD ]------------------------------------------ #  <BEGIN># #-----[ AFTER **CODE**, ADD ]------------------------------------------ #  <END>  # #-----[ FIND ]------------------------------------------ ## The code you want to remain hidden from everyone except administrators and moderators  # #-----[ BEFORE **CODE**, ADD ]------------------------------------------ #  <BEGIN># #-----[ AFTER **CODE**, ADD ]------------------------------------------ #  <END>  # #-----[ SAVE & CLOSE ALL FILES ]-------------------------- #
Last edited by Skywalker on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.

Skywalker
Sr Integra Member
Sr Integra Member
 
Posts: 236
Likes: 0 post
Liked in: 0 post
Joined: Fri Apr 14, 2006 4:25 pm
Cash on hand: 0.00

PostAuthor: Jason Sanborn » Thu May 25, 2006 9:28 am

Thanks for that code, Skywalker. <img>

Sanji, you can use that code that Skywalker posted to add the functionality for hiding buttons based on Admin/Moderator rights.

<BEGIN>
<td>Button Image</td>
<END>

Since each button is its own cell, you can safely hide or remove any button you want, without affecting the overall layout of the box.
Last edited by Jason Sanborn on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.
[url=http][img=left]http://images.cbreview.net/banners/cloney2.gif[/img]
Comic Book Review: Comics, Role Playing and More[/url]
User avatar
Jason Sanborn
Sr Integra Member
Sr Integra Member
 
Posts: 436
Likes: 0 post
Liked in: 0 post
Joined: Sat Apr 08, 2006 9:40 am
Cash on hand: 0.00
Location: Marina, CA

PostAuthor: Jason Sanborn » Thu May 25, 2006 9:29 am

Fixed a bug that cropped some of the text from certain wizards in IE.

Updated bbcode_box.js file is located in the first post. If you wish to manually update, here are the appropriate fixes for the bbcode_box.js file:

FIND:
Code: Select all
function showPrompt(promptMsg,promptDefault,promptReq,promptReqErr,promptRegExp,promptRegExpErr){

AFTER ADD]     if (is_ie)     {         promptMsg = promptMsg.replace(/n/gi," ");         promptMsg = promptMsg.replace(/  /gi," ");     }[/code]
FIND:
Code: Select all
                var Prompt2 = showPrompt("Enter image positioning.nLeave blank for no positioning.nEnter 'left' to position to left of text.nEnter 'right' to position to right of text.nEnter 'center' to center the image in the line.","",0,"",/(left|right|center)/i,"Valid options are 'left', 'right', 'center', or leave blank.");

REPLACE WITH]                 var Prompt2 = showPrompt("Enter image position.nLEFT = Position to left of text.nRIGHT = Position to right of text.nCENTER = Center in line.nLeave blank for no positioning.","",0,"",/(left|right|center)/i,"Valid options are 'left', 'right', 'center', or leave blank.");[/code]
Last edited by Jason Sanborn on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.
[url=http][img=left]http://images.cbreview.net/banners/cloney2.gif[/img]
Comic Book Review: Comics, Role Playing and More[/url]
User avatar
Jason Sanborn
Sr Integra Member
Sr Integra Member
 
Posts: 436
Likes: 0 post
Liked in: 0 post
Joined: Sat Apr 08, 2006 9:40 am
Cash on hand: 0.00
Location: Marina, CA

PostAuthor: sanji » Thu May 25, 2006 1:55 pm

Thanks Skywalker for the code, and thanks Jason for the abstract.

It is working fine, and I think it is really useful! I just added an extra row with all codes only for admin and moderators.

Support is really efficient and friendly, greatly appreciate that!

sanji
Last edited by sanji on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.
[img]http://www.secret-japan.com/forum/images/banners/fuji%20secret-japan%2088x31.gif[/img] [url=http]Secret Japan[/url] : discover Japan off the beaten tracks

sanji
Sr Integra Member
Sr Integra Member
 
Posts: 291
Likes: 0 post
Liked in: 0 post
Joined: Wed Apr 12, 2006 8:18 pm
Cash on hand: 0.00

Re: [MOD] Advanced BBCode Box 5.0.0a-4

PostAuthor: Threat009 » Thu May 25, 2006 2:43 pm

Not really sure if this is related to this mod. If it's not I'll just start a new topic elsewhere. I've got a problem here, and the only thing that has been recently modified is this particular mod. Anyway, I'm in the ACP, but when ever I edit anything I lose the ACP menu. Like I said I dunno if it's related to this mod, b/c it seems to be a forum wide blocks issue or something. Can you confirm this mod is not at fault before I start a new thread? Thanks......
Last edited by Threat009 on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.
[url=http][img=left]http://i63.photobucket.com/albums/h129/Threat009/donate.gif[/img][/url]
User avatar
Threat009
Sr Integra Member
Sr Integra Member
 
Posts: 220
Likes: 0 post
Liked in: 0 post
Joined: Sun Apr 09, 2006 11:48 pm
Cash on hand: 0.00

PostAuthor: Jason Sanborn » Thu May 25, 2006 7:41 pm

The Advanced BBCode Box doesn't have anything to do with the ACP. The only part of the ACP affected is the editing of IM blocks, which doesn't affect the menu. Are there any other mods you've installed recently?
Last edited by Jason Sanborn on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.
[url=http][img=left]http://images.cbreview.net/banners/cloney2.gif[/img]
Comic Book Review: Comics, Role Playing and More[/url]
User avatar
Jason Sanborn
Sr Integra Member
Sr Integra Member
 
Posts: 436
Likes: 0 post
Liked in: 0 post
Joined: Sat Apr 08, 2006 9:40 am
Cash on hand: 0.00
Location: Marina, CA

PostAuthor: Jason Sanborn » Thu May 25, 2006 8:10 pm

Just as an added FYI: I tested the edit function on the blocks, where the Advanced BBCode Box is installed, and I don't lose the ACP menu.
Last edited by Jason Sanborn on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.
[url=http][img=left]http://images.cbreview.net/banners/cloney2.gif[/img]
Comic Book Review: Comics, Role Playing and More[/url]
User avatar
Jason Sanborn
Sr Integra Member
Sr Integra Member
 
Posts: 436
Likes: 0 post
Liked in: 0 post
Joined: Sat Apr 08, 2006 9:40 am
Cash on hand: 0.00
Location: Marina, CA

PostAuthor: Threat009 » Fri May 26, 2006 11:52 am

"Jason Sanborn";p="7375" wrote:Just as an added FYI: I tested the edit function on the blocks, where the Advanced BBCode Box is installed, and I don't lose the ACP menu.

Alrighty, thanks Jason <img>
Last edited by Threat009 on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.
[url=http][img=left]http://i63.photobucket.com/albums/h129/Threat009/donate.gif[/img][/url]
User avatar
Threat009
Sr Integra Member
Sr Integra Member
 
Posts: 220
Likes: 0 post
Liked in: 0 post
Joined: Sun Apr 09, 2006 11:48 pm
Cash on hand: 0.00

PostAuthor: Jason Sanborn » Fri May 26, 2006 4:34 pm

Updated to version 5. If you've applied the previous fixes in this thread as they've come out, you don't need to worry. This version is just a roll-up of all the previous fixes. <img>
Last edited by Jason Sanborn on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.
[url=http][img=left]http://images.cbreview.net/banners/cloney2.gif[/img]
Comic Book Review: Comics, Role Playing and More[/url]
User avatar
Jason Sanborn
Sr Integra Member
Sr Integra Member
 
Posts: 436
Likes: 0 post
Liked in: 0 post
Joined: Sat Apr 08, 2006 9:40 am
Cash on hand: 0.00
Location: Marina, CA

PostAuthor: Michaelo » Fri May 26, 2006 4:43 pm

Nice work Skywalker we should add this to How to?
Mike
Last edited by Michaelo on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.
Kiss Portal Engine phpbbireland (status: Released)
User avatar
Michaelo
Administrator
Administrator
 
Posts: 1646
Likes: 0 post
Liked in: 0 post
Joined: Sat Mar 11, 2006 5:14 pm
Cash on hand: 0.00
Location: Dublin, Ireland

PostAuthor: sanji » Wed May 31, 2006 5:39 pm

I wonder... for a future release, would it be possible to take out the code relative to language and put them in a classical language file?

Like the normal bbcode, only only language can be used on a board, as the texts are hard-coded. Having them in language files would be really a neat improvement...

sanji
Last edited by sanji on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.
[img]http://www.secret-japan.com/forum/images/banners/fuji%20secret-japan%2088x31.gif[/img] [url=http]Secret Japan[/url] : discover Japan off the beaten tracks

sanji
Sr Integra Member
Sr Integra Member
 
Posts: 291
Likes: 0 post
Liked in: 0 post
Joined: Wed Apr 12, 2006 8:18 pm
Cash on hand: 0.00

PostAuthor: Jason Sanborn » Wed May 31, 2006 6:11 pm

In the planning stages. Check out this thread for more info:
http://forums.simplicitypoint.com/viewtopic.php?t=20
Last edited by Jason Sanborn on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.
[url=http][img=left]http://images.cbreview.net/banners/cloney2.gif[/img]
Comic Book Review: Comics, Role Playing and More[/url]
User avatar
Jason Sanborn
Sr Integra Member
Sr Integra Member
 
Posts: 436
Likes: 0 post
Liked in: 0 post
Joined: Sat Apr 08, 2006 9:40 am
Cash on hand: 0.00
Location: Marina, CA

Re: [MOD] Advanced BBCode Box 5.0.0a-6

PostAuthor: Jason Sanborn » Mon Jun 05, 2006 2:34 pm

Advanced BBCode Box was updated to version 6 to fix an issue found during 1.4.1 Beta Testing. On the IM Portal Edit Block (In the Admin Control Panel), some buttons were disappearing when they were being clicked on. As a result, a second BBCode JS file was created to handle image swapping for the BBCode boxes in the ACP.

To update:

DOWNLOAD: adv_bbcode_box_upg.zip

COPY: bbcode_box_a.js to mods/bbcode_box/bbcode_box_a.js

OPEN: templates/fisubice/admin/blocks_edit_body.tpl

FIND:
Code: Select all
<script></script>

REPLACE WITH]<script></script>[/code]

Note: If you have added buttons to the BBCode Box, please add the appropriate JavaScript into the new JS file, as you had done with the first JS file. In the case of images, make sure you use the correct relative image path, by adding [font=Courier New:3mufqndv]./../[/font:3mufqndv] in front of the image path. That is the only difference between the two JavaScript files. I recommend using [url=http]WinMerge[/url] to compare the two files for the differences.
Last edited by Jason Sanborn on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.
[url=http][img=left]http://images.cbreview.net/banners/cloney2.gif[/img]
Comic Book Review: Comics, Role Playing and More[/url]
User avatar
Jason Sanborn
Sr Integra Member
Sr Integra Member
 
Posts: 436
Likes: 0 post
Liked in: 0 post
Joined: Sat Apr 08, 2006 9:40 am
Cash on hand: 0.00
Location: Marina, CA

PostAuthor: badboy » Wed Jun 07, 2006 11:45 am

installed this mod and love it but dont see spell checker when i am posting a message i downloaded the pre-moded version

can some1 help please
Last edited by badboy on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.
[url=http][img=left]http://img50.imageshack.us/img50/2371/userbar19iy.gif[/img][/url]
User avatar
badboy
Members
Members
 
Posts: 46
Likes: 0 post
Liked in: 0 post
Joined: Sun May 21, 2006 12:03 am
Cash on hand: 0.00

PostAuthor: Jason Sanborn » Wed Jun 07, 2006 11:50 am

The spellcheck button was moved and is now in the top row of buttons, above the font type. It looks like a check mark with ABC above it.
Last edited by Jason Sanborn on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.
[url=http][img=left]http://images.cbreview.net/banners/cloney2.gif[/img]
Comic Book Review: Comics, Role Playing and More[/url]
User avatar
Jason Sanborn
Sr Integra Member
Sr Integra Member
 
Posts: 436
Likes: 0 post
Liked in: 0 post
Joined: Sat Apr 08, 2006 9:40 am
Cash on hand: 0.00
Location: Marina, CA

PreviousNext

Return to Mods/Hacks

Who is online

Registered users: Google [Bot], Helter, Majestic-12 [Bot]