News:

cpg1.5.46 Security release - upgrade mandatory!The Coppermine development team is releasing a security update for Coppermine in order to counter recently discovered vulnerabilities. It is important that all users who run version cpg1.5.44 or older update to this latest version as soon as possible.[more]

when I went to switch the codebase to the one that gives me the html code instead of bbc code it lasted about 20 minutes then my entire directory went offline...I had no access whatsoever to the directory anymore...none of my machines did

it was when I installed the one from the forums here that has this in the configuration

>--Modified by Zachary Barnes of UselessHacks.com'

almost like my gallery was hacked...was giving me 403 permission denied errors on the whole directory

I eventually had to remove and uninstall the entire directory and reinstall it to get it to go back to normal and able to be viewed again...

I don't really know where to post this, so hopefully this is the best place. I modified your BB code plugin so that it would display html tag links instead, and combined it with the javascript toggle display div to make it visible only when you click on a link that sits below the picture. I also removed the copy code, because it didn't support FF.

You can also easily comment out if you don't want any of the particular sizes to be displayed.

The only problem that I have is that once you click the link, you can't make it invisible again until the page reloads, because the css in

<?php/************************************************** CPG BB Code Plugin for Coppermine Photo Gallery Modified by Zachary Barnes of UselessHacks.comNow creates html tags instead of BB ************************************************* Copyright (c) 2006 Thomas Lange <stramm@gmx.net> ************************************************* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. ************************************************* Coppermine version: 1.4.9 BB Code Plugin version: 1.2 $Revision: 1.0 $ $Author: stramm $***************************************************/

//Javascript to hide hotlinking information along with div arrangement, taken from a common toggling script floating around the net$script_data = <<< EOT<script language="javascript" type="text/javascript"><!--function toggleLayer(whichLayer){if (document.getElementById){// this is the way the standards workvar style2 = document.getElementById(whichLayer).style;style2.display = style2.display? "":"block";}else if (document.all){// this is the way old msie versions workvar style2 = document.all[whichLayer].style;style2.display = style2.display? "":"block";}else if (document.layers){// this is the way nn4 worksvar style2 = document.layers[whichLayer].style;style2.display = style2.display? "":"block";}}//--></script>

EDIT: Fixed a few bugs. Now trying to find a replacement for 'wrap="off"' that validates under xhtml.

EDIT: The good news is that the above code is now XHTML valid.

Apparently, everyone is looking for a wrap=off equivalent that validates under xhtml, but it doesn't exists. So to keep all the text on one line, I've used "&nbsp;" for all of the spaces, effectively linking everything together. Unfortunately, in FF, if your picture title has a space in it, it will chop it up to two lines. IE6 works fine, and keeps everything on the same line.

So, you could increase the rows to 'rows="2"', or you could remove the 'alt="$name"' attribute, but I'm sticking with it like it is unless anyone has any work-arounds or suggestions.

if you download the batch files under his name on the particular posting...you will see that he modified stramms php codebase and had put his name in the "created by" up top

after the installation of his version of the image sourcing things went to hell in a handbasket and excuse me if I happened to forget to add this to my last bit of asking for assistance

you have no idea how annoyed I was when I had to lose over 10,000 uploaded images because the only way to get back into the gallery was to remove it from my server and put it back...simple oversight

you have no idea how annoyed I was when I had to lose over 10,000 uploaded images because the only way to get back into the gallery was to remove it from my server and put it back...simple oversight

That's complete, utter nonsense. It wouldn't have been necessary to perform a fresh install. Simply undoing the damage would have been enough. Why didn't you ask how to remove the damage instead of starting all over and then (after making that mistake) complaining?

Why didn't you use the original one posted by Stramm? The one you refer to is just an unsupported contribution. There's no guarantee that it works as expected. That's complete, utter nonsense. It wouldn't have been necessary to perform a fresh install. Simply undoing the damage would have been enough. Why didn't you ask how to remove the damage instead of starting all over and then (after making that mistake) complaining?I will not allow you to clutter this thread with invalid rants. Do as I suggested and post a link to your gallery or stop wasting everybody's time and stop posting.

and I did try to fix the problem by putting all the code back the way that it was before the plugin install and it didnt work...tried numerous times to remove all instances of the codebase for the last 4 hours BEFORE coming here to register and ask for assistance....searching for some tidbit of answers thru THIS forum and many thread strings and I found no help...

the reason i used the modified version is because it gave the img src codes that I need instead of the bbcodes which I cant use for what the gallery is intended for

and now after the fifth hour has passed I have found the problem and it is working

$pic_data['html'] = $bbcode_data.$pic_data['html'];The parse error... of course you'll get one. If you use strings in php they have to be in single or double quotes. If you use eg. single quotes, then you can't use these within the string as you do. You need to escape the single quotes within the string using \

The parse error... of course you'll get one. If you use strings in php they have to be in single or double quotes. If you use eg. single quotes, then you can't use these within the string as you do. You need to escape the single quotes within the string using \

$bbcode_data .= '<td><a href="http://tapeciarz.mobile.net.pl/imageuploader-partner.xhtml?sid=302&theme=clean&img=http://tapetypulpitu.pl/'.$fullsize_url.'" target="_blank">Wyslij na telefon</a></td>';and works but how add to this window.open?

php syntaxwise it looks OK... to add the javascript window open... search the web... if you need single quotes within the string, then escape them as I told you. not valid: 'a'string' valid: 'a\'string' valid: "a'string" not valid: "a"string" valid: 'a"string\'is\'this'

Awesome mod! Thank you very much Stramm (and also thanks to PirateZipp for your version, which looks very cool). You can see this in action at www.nikongear.com - click on the PHOTOS link in the main menu.

Is there any way to only select by Category so I can display different code for fullsize pics for one Category and thumbs in the bbcode for others? I thought it would be something like if ($_GET["cat"] == 'X' ) XXXXXXX } else if { if ($_GET["cat"] == 'X1' ) XXXXXXXX but I have tried this and can not get it to work correctly. Does anyone have a modification or know how to do this?? Thanks in advance for any help given

I think I already answered that question before... nevertheless, it's easy doable by album, if you want to go for cats... I think you'll have to do an additional query. The album id is stored in an array

the following code would not show the bbcode for the given albums in the forbidden array

Stramm thanks for a little insight as to not being able to do this by Cat. Album is just fine. I know how to make it not work for selected albums thanks for the most part to you however I would like to display different bbcode under say albums 2345 then what I display under albums 6789 and so on. would I choose from the array list if a if then else statement??? Thanks for your help in getting my in the right direction.

$forbidden = array(2,4,6,8);if (in_array($pic_data['aid'],$forbidden)) {$bbcode_data = 'bbcode for albums 2,4,6 and 8';} else {$bbcode_data = 'different stuff for all the other albums';}$pic_data['html'] = $pic_data['html'].$bbcode_data;return $pic_data;you also could use the switch satement or ....

Thank you Stramm for all the time you've spent helping everyone. With all your input, I was able to configure your plugin to exactly how I like it.

Instead of coming here with a question, I come with a (somewhat) solution.

In my image gallery, I have not only images, but movies, audio, and misc. files (.zip, .rar, etc.). I only wanted to have the bbcode show for images, and not for any other file. I'm not fluent in php, but I was able to figure this out on my own.

I encountered a problem with this plugin and the "Chaotic" style. The Chaotic style attaches a "frame" around the intermediate images, and thus this plugin was inserting the BBcode table between the image and frame.

After figuring out CPG a little (which was very hard as I found almost zero plugin-writing documentation--I hope someone is working on this!!), I changed the plugin to this:

$fullsize_url = get_pic_url($CURRENT_PIC_DATA); //here we grab the url to the fullsized pic$thumb_url = get_pic_url($CURRENT_PIC_DATA, 'thumb'); //thumb url$CURRENT_PIC_DATA['title'] ? $name = $CURRENT_PIC_DATA['title'] : $name = 'No Title'; //checking if the pic has a title, if not we set it to 'No title'

}?>If you see anything that's not right with this, can someone please say something? I know next to nothing about Coppermine and I'm not sure what difference there is--if any--between $CURRENT_PIC_DATA and the $pic_data you used in the original plugin.

And that brings me to my next point: I'll have to go back and check now, but I believe I have found some kind of error. I was testing this on a photo with a space in the title, e.g. "Jim Bob", and I noticed that the 2nd URL code looked like this:

[url="http://localhost/path/to/image"]Jim And then stopped at the space.

Is this some problem with $CURRENT_PIC_DATA or does this exist in the original plugin? Like I said, I have to go back and check now, but I'm too lazy to do it right now (I was working at another computer). Chances are I'll do it before someone replies, so I'll probably be replying again shortly.

Anyway, this isn't much a problem for me as it may be for everyone using this plugin, since I probably won't be using that BBcode box anyway... just the 1st one, and then adding my own.

EDIT: ^^ That space problem doesn't actually exist.. For whatever reason the URL breaks to a new line, and you can only see the whole thing if you scroll with your scroll wheel, instead of there being a scroll bar that shows you there is more to the URL.