forum.coppermine-gallery.net
Support => cpg1.4.x Support => Older/other versions => cpg1.4 miscellaneous => Topic started by: Muurvaren on September 09, 2006, 12:11:55 pm
-
Hi there!
I’ am trying to integrate an external counter (BBclone) in thumpnails.php in order to know what album is liked most by visitors.
This is working but the value of $counter_text is represented by the album number. I want the _name_ of the album instead.
The number is displayed by: $counter_text = $album;
I tried everything but no go... ???
I searched this board and also the forum of BBClone but it didn't solve my problem (although several users are using BBclone the same way i want to...).
Anyone to help me out?
My site is at: http://www.muurvaren.nl/
-
Post your code.
-
Post your code.
$counter_text = $album;
define("_BBC_PAGE_NAME", $counter_text);
define("_BBCLONE_DIR", "bbclone/");
define("COUNTER", _BBCLONE_DIR."mark_page.php");
if (is_readable(COUNTER)) include_once(COUNTER);
The code is inserted at the end of thumbnails.php
-
Try this:
$counter_text = $CURRENT_ALBUM_DATA['title'];
-
Related thread: Intergrate BBClone into cpg142 (http://forum.coppermine-gallery.net/index.php?topic=24937.0)
-
Try this:
$counter_text = $CURRENT_ALBUM_DATA['title'];
Already tried that one, no success :(
-
Related thread: Intergrate BBClone into cpg142 (http://forum.coppermine-gallery.net/index.php?topic=24937.0)
No, this one (witch I already found myself) does not work either. It's an easy question (Changing the numeric value of the album to the actual name of the album) but the answer seems to be rather difficult...
-
This would be the simplest way without looking into the code in detail.
if (is_numeric($album)){
$sql = "SELECT title FROM {$CONFIG['TABLE_ALBUMS']} WHERE aid = $album";
$result = cpg_db_query($sql);
list($album) = mysql_fetch_row($result);
}
$counter_text = $album;
define("_BBC_PAGE_NAME", $counter_text);
define("_BBCLONE_DIR", "bbclone/");
define("COUNTER", _BBCLONE_DIR."mark_page.php");
if (is_readable(COUNTER)) include_once(COUNTER);
Should go just before pagefooter()
-
This would be the simplest way without looking into the code in detail.
if (is_numeric($album)){
$sql = "SELECT title FROM {$CONFIG['TABLE_ALBUMS']} WHERE aid = $album";
list($album) = mysql_fetch_row($result);
}
$counter_text = $album;
define("_BBC_PAGE_NAME", $counter_text);
define("_BBCLONE_DIR", "bbclone/");
define("COUNTER", _BBCLONE_DIR."mark_page.php");
if (is_readable(COUNTER)) include_once(COUNTER);
Should go just before pagefooter()
Thanks for the effort Nibbler, but no go... (it returns nothing)
http://www.muurvaren.nl/bbclone/show_detailed.php?lng=nl
-
I missed out the most important part of the code, that's why. I edited it into my post so try again with the new code.
-
I missed out the most important part of the code, that's why. I edited it into my post so try again with the new code.
Nop... ???
-
So you have this code at the end of thumbnails.php and it doesn't work ?
$META_ALBUM_SET = $ALBUM_SET; //temporary assignment until we are sure we are keeping the $META_ALBUM_SET functionality.
CPGPluginAPI::filter('post_breadcrumb',null);
if (!$valid) {
form_albpw();
} else {
display_thumbnails($album, (isset($cat) ? $cat : 0), $page, $CONFIG['thumbcols'], $CONFIG['thumbrows'], true);
}
if (is_numeric($album)){
$sql = "SELECT title FROM {$CONFIG['TABLE_ALBUMS']} WHERE aid = $album";
$result = cpg_db_query($sql);
list($album) = mysql_fetch_row($result);
}
$counter_text = $album;
define("_BBC_PAGE_NAME", $counter_text);
define("_BBCLONE_DIR", "bbclone/");
define("COUNTER", _BBCLONE_DIR."mark_page.php");
if (is_readable(COUNTER)) include_once(COUNTER);
pagefooter();
ob_end_flush();
?>
-
So you have this code at the end of thumbnails.php and it doesn't work ?
$META_ALBUM_SET = $ALBUM_SET; //temporary assignment until we are sure we are keeping the $META_ALBUM_SET functionality.
CPGPluginAPI::filter('post_breadcrumb',null);
if (!$valid) {
form_albpw();
} else {
display_thumbnails($album, (isset($cat) ? $cat : 0), $page, $CONFIG['thumbcols'], $CONFIG['thumbrows'], true);
}
if (is_numeric($album)){
$sql = "SELECT title FROM {$CONFIG['TABLE_ALBUMS']} WHERE aid = $album";
$result = cpg_db_query($sql);
list($album) = mysql_fetch_row($result);
}
$counter_text = $album;
define("_BBC_PAGE_NAME", $counter_text);
define("_BBCLONE_DIR", "bbclone/");
define("COUNTER", _BBCLONE_DIR."mark_page.php");
if (is_readable(COUNTER)) include_once(COUNTER);
pagefooter();
ob_end_flush();
?>
No it returns 'Main Site'...
You can see it your self:
http://www.muurvaren.nl/bbclone/show_detailed.php?lng=en
-
So you have this code at the end of thumbnails.php and it doesn't work ?
Hi Nibbler,
Had to remove the code because it showed the thumbnails twice on the same page... ;D
-
Post the complete file, you probably have added the code all wrong.
-
Post the complete file, you probably have added the code all wrong.
Here it is...
-
Add the code I posted.
-
Add the code I posted.
To be sure I upgraded to 1.4.9 (from 1.4.8 )
-
That a 1.4.8 file and is incomplete.
-
That a 1.4.8 file and is incomplete.
My mistake, sorry!
Attaches is the 1.4.9 version of thumpnails.php
-
I am really looking forward to this but would it be usable for other than thumpnails as well ???
More like a footer ...
-
File is incomplete. See for yourself.
-
File is incomplete. See for yourself.
I did check, what is missing in you’re opinion? I compared my file with the thumnails.php from CPG 1.4.9 and see no difference accept you’re additional code... ???
-
It ends in the middle of a word.
if (is_numeric($album)){
$sql = "SELECT title FROM {$CONFIG['TABLE_ALBUMS']} WHERE aid = $album";
$result = cpg_db_query($sql);
list($album) = mysql_fetch_r
-
It ends in the middle of a word.
if (is_numeric($album)){
$sql = "SELECT title FROM {$CONFIG['TABLE_ALBUMS']} WHERE aid = $album";
$result = cpg_db_query($sql);
list($album) = mysql_fetch_r
I just downloaded my earlier submitted file and (double) checked, its complete!
As the one on my website.