Anycontent not working (supose something with SMF bridge) Anycontent not working (supose something with SMF bridge)
 

News:

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

Main Menu

Anycontent not working (supose something with SMF bridge)

Started by MrTeck, December 26, 2005, 04:28:27 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

MrTeck

Coppermine version: 1.4.2
SMF 1.0.5 + Tinyportal
Bridge: smf10.inc.php 1.4.3 - udb_base.inc.php 1.4.3

In my previous cpg (1.3.5 + pnCPG 2.4) this anycontent block was working perfectly, and now only shows emty tables... I supose is something related to the bridge.
The block code is:
<?php
/*************************
  Coppermine Photo Gallery
  ************************
  Copyright (c) 2003-2005 Coppermine Dev Team
  v1.1 originaly written by Gregory DEMAR

  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.2
  $Source: /cvsroot/coppermine/devel/anycontent.php,v $
  $Revision: 1.14 $
  $Author: gaugau $
  $Date: 2005/10/25 01:15:41 $
**********************************************/

/**
* Coppermine Photo Gallery 1.4.2 anycontent.php
*
* This file file gets included in the index.php if you set the option in admin
* can be used to display any content from any program, it is always to be edited
* according to tastes and then used
*
* @copyright 2002,2005 Gregory DEMAR, Coppermine Dev Team
* @license http://opensource.org/licenses/gpl-license.php GNU General Public License V2
* @package Coppermine
* @version $Id: anycontent.php,v 1.14 2005/10/25 01:15:41 gaugau Exp $
*/

if (!defined('IN_COPPERMINE')) die('Not in Coppermine...');

starttable("100%""Top");

echo 
'<table width="100%"><tr><td width="33%" valign="top">';
starttable("100%""Top Fotografos",2);

$result db_query("SELECT user_name, user_id, group_name, COUNT(*) AS numpics FROM {$CONFIG['TABLE_PICTURES']}{$CONFIG['TABLE_USERS']}{$CONFIG['TABLE_USERGROUPS']} WHERE user_id = owner_id AND user_group = group_id GROUP BY owner_id ORDER BY numpics DESC LIMIT 5");

$i 1;
while (
$row mysql_fetch_assoc($result)){
echo "<tr><td class=\"tableb\" >" $i++ . ") <a href=\"profile.php?uid={$row['user_id']}\">{$row['user_name']}</a></td><td class=\"tableb\"><a href=\"thumbnails.php?album=lastupby&uid={$row['user_id']}\">{$row['numpics']} imágenes</a></td></tr>";
}

endtable();
echo 
'</td><td width="33%" valign="top">';
starttable("100%""Top Comentarios",2);

$result db_query("SELECT user_name, user_id, group_name, COUNT(*) AS numcom FROM {$CONFIG['TABLE_COMMENTS']}{$CONFIG['TABLE_USERS']}{$CONFIG['TABLE_USERGROUPS']} WHERE user_id = author_id AND user_group = group_id GROUP BY author_id ORDER BY numcom DESC LIMIT 5");

$i 1;
while (
$row mysql_fetch_assoc($result)){
echo "<tr><td class=\"tableb\" >" $i++ . ") <a href=\"profile.php?uid={$row['user_id']}\">{$row['user_name']}</a></td><td class=\"tableb\"><a href=\"thumbnails.php?album=lastcomby&uid={$row['user_id']}\">{$row['numcom']} comentarios</a></td></tr>";
}

endtable();
echo 
'</td><td width="33%" valign="top">';
starttable("100%""Top Fotografos mas vistos",2);

$result db_query("SELECT user_name, user_id, SUM(hits) AS numhits FROM {$CONFIG['TABLE_USERS']}{$CONFIG['TABLE_USERGROUPS']}{$CONFIG['TABLE_PICTURES']} WHERE user_id = owner_id AND user_group = group_id GROUP BY owner_id ORDER BY numhits DESC LIMIT 5");

$i 1;
while (
$row mysql_fetch_assoc($result)){
echo 
"<tr><td class=\"tableb\" >" $i++ . ") <a href=\"profile.php?uid={$row['user_id']}\">{$row['user_name']}</a> {$row['group_name']}</td><td class=\"tableb\"><a href=\"thumbnails.php?album=lastupby&uid={$row['user_id']}\">{$row['numhits']} vistas</a></td></tr>";
}

endtable();
echo 
'</td></tr>';
endtable();

?>



Tnx for any help :)

Nibbler

change db_query to cpg_db_query

I doubt that mod will work with SMF, read the thread dealing with it.