gffb
Can we add the bbcode [siteimg] this will allow users to directly link the a picture in an album on the forum as at the moment no album pictures can be shown in a post, unless you can find out thier true url here is my suggestion
- Code: Select all
##-----[ OPEN ]------------------------------------------#includes/bbcode.php ##-----[ FIND ]------------------------------------------#// We do URLs in several different ways.. $bbcode_tpl['url1'] = str_replace('{URL}', '\1', $bbcode_tpl['url']); $bbcode_tpl['url1'] = str_replace('{DESCRIPTION}', '\1', $bbcode_tpl['url1']); ##-----[ BEFORE, ADD ]------------------------------------------# // site img code for doing local images in the press mod. $bbcode_tpl['siteimg'] = str_replace('{IMG_NUM}', '\1', $bbcode_tpl['siteimg']); // end site image ##-----[ FIND ]------------------------------------------# // [flash=,]image_url_here[/flash:p988ikp3] code.. // This one gets first-passed.. ##-----[ BEFORE, ADD ]------------------------------------------# //site image for printing press // [siteimg]image number here[/img] $local_patterns[5] = "#[siteimg:$uid]([0-9]+)[/siteimg:$uid]#si"; $local_replacements[5] = $bbcode_tpl['siteimg']; $text = preg_replace($local_patterns, $local_replacements, $text); //site image for printing press end ##-----[ FIND ]------------------------------------------# // [flash=,:p988ikp3]image_url_here[/flash:p988ikp3] code.. $text = preg_replace("#[img]((http|ftp|https|ftps)://)([^ ?&=#"nrt<]*?(.(jpg|jpeg|gif|png)))[/img]#sie", "'[img]\1' . str_replace(' ', '%20', '\3') . '[/img]'", $text); ##-----[ BEFORE, ADD ]------------------------------------------ // [siteimg]image_url_here[/img] code.. $text = preg_replace("#[siteimg]([0-9]+)[/siteimg]#sie", "'[siteimg:$uid]\1[/siteimg:$uid]'", $text); // siteimg-end ##-----[ OPEN ]------------------------------------------#templates/fisubice/bbcode.tpl ##-----[ FIND ]------------------------------------------#<BEGIN><a>{DESCRIPTION}</a><END> ##-----[ AFTER, ADD ]------------------------------------------# <BEGIN><a><img></a><END> ##-----[ SAVE/CLOSE ALL FILES ]------------------------------------------#
This will allow the use of code
- Code: Select all
[siteimage]thumbnail id number (ie 3 )[/siteimage] for example [siteimage]3[/siteimage]
The only other thing to add to this would be a site image bbcode button.[hr]gffb
Also been able to add the bbc image and .js script
upload any image called album_pic.gif to YOURFORUMFOLDERbbcode_boximages
- Code: Select all
##-----[ OPEN ]------------------------------------------#templatespost_message.js ##-----[ FIND ]------------------------------------------#fade_help = "Fade text]text[/fade:p988ikp3]"; ##-----[ AFTER, ADD ]------------------------------------------# siteimg_help = "Insert Pic ID # from album gallery:[siteimg]Pic ID#[/siteimg]"; ##-----[ FIND ]------------------------------------------#var is_submit = false; ##-----[ AFTER, ADD ]------------------------------------------# var siteimg = 0; function BBCsiteimg() {var FoundErrors = '';var enterURL = prompt("Enter the Pic ID#");if (!enterURL) {FoundErrors += "You didn't enter the number";}if (FoundErrors) {alert("Error :"+FoundErrors);return;}var ToAdd = "[siteimg]"+enterURL+"[/siteimg]";document.post.message.value+=ToAdd;document.post.message.focus();} ##-----[ SAVE/CLOSE ALL FILES ]------------------------------------------#
[hr:p988ikp3]Jason Sanborn
I can add this into the Advanced BBCode Box as well. I'll create a new image for it, and place it next to the image button. I can update that tomorrow.[hr:p988ikp3]Jason Sanborn
Advanced BBCode Box was updated. I added [siteimg=left] and [siteimg=right] to the code as well, to keep with similar functionality of the [img] tag.[hr:p988ikp3]Hope that helps
A