"uploader with the picture info" hack not working "uploader with the picture info" hack not working
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

"uploader with the picture info" hack not working

Started by cerberus, July 19, 2004, 03:26:39 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

cerberus

I've got coppermine integrated with YaBB SE and I've applied the "How can I display the name of the uploader with the picture info?" hack as described in the FAQ. But it isn't working. I'm encountering the following error:
Template error
Failed to find block 'config'(#(<!-- BEGIN config -->)(.*?)(<!-- END config -->)#s) in :


                <div align="left">
                <table cellpadding="0" cellspacing="1">
                        <tr>
                                <td class="admin_menu"><a href="editpics.php?mode=upload_approval" title="">{UPL_APP_LNK}</a></td>
                                <td class="admin_menu"><a href="config.php" title="">{CONFIG_LNK}</a></td>
                                <td class="admin_menu"><a href="albmgr.php{CATL}" title="">{ALBUMS_LNK}</a></td>
                                <td class="admin_menu"><a href="catmgr.php" title="">{CATEGORIES_LNK}</a></td>
                                <td class="admin_menu"><a href="usermgr.php" title="">{USERS_LNK}</a></td>
                                <td class="admin_menu"><a href="groupmgr.php" title="">{GROUPS_LNK}</a></td>
                                <td class="admin_menu"><a href="banning.php" title="">{BAN_LNK}</a></td>
                                <td class="admin_menu"><a href="reviewcom.php" title="">{COMMENTS_LNK}</a></td>
                                <td class="admin_menu"><a href="searchnew.php" title="">{SEARCHNEW_LNK}</a></td>
                                <td class="admin_menu"><a href="util.php" title="">{UTIL_LNK}</a></td>
                                <td class="admin_menu"><a href="profile.php?op=edit_profile" title="">{MY_PROF_LNK}</a></td>
                        </tr>
                </table>
                </div>

Any idea?
With Best Regards, Cerberus
Edamus, bibamus, gaudeamus.
http://www.pocketpcrussia.com - My Main Site

cerberus

I was editing the wrong file lol ;D.

But now I've edited the right files and I get:
QuoteThere was an error while processing a database query
With Best Regards, Cerberus
Edamus, bibamus, gaudeamus.
http://www.pocketpcrussia.com - My Main Site

Joachim Müller

When experiencing this error, you should always enable debug_mode in coppermine config to see what query actually fails.

GauGau

cerberus

QuoteWhile executing query "SELECT pid, filepath, filename, url_prefix, filesize, pwidth, pheight, ctime, title, caption, hits, user_name from foto_pictures AS p LEFT JOIN **ERROR** AS u ON u.user_id = p.owner_id WHERE p.aid='8'   ORDER BY pid ASC  LIMIT 0 ,12" on 0

mySQL error: You have an error in your SQL syntax.  Check the manual that corresponds to your MySQL server version for the right syntax to use near '**ERROR** AS u ON u.user_id = p.owner_id WHERE p.aid='8'   ORDE

I guess it's referring to
$result = db_query("SELECT $select_columns from {$CONFIG['TABLE_PICTURES']} AS p LEFT JOIN {$CONFIG['TABLE_USERS']} AS u ON u.user_id = p.owner_id WHERE p.aid='$album' $approved $ALBUM_SET ORDER BY $sort_order $limit");
With Best Regards, Cerberus
Edamus, bibamus, gaudeamus.
http://www.pocketpcrussia.com - My Main Site

Joachim Müller

hm, not sure. Does the error go away if you undo the mod?

GauGau

cerberus

Yes. When I've replaced functions.inc.php with an "unmodded" functions.inc.php the problem vanished. I exclude any sort of conflict with other mods, because that was and is the first mod I've installed on that gallery :).

I've did all the procedure again but I still have the same problem :(
With Best Regards, Cerberus
Edamus, bibamus, gaudeamus.
http://www.pocketpcrussia.com - My Main Site

Nibbler

That hack won't work with a bridged install, you would need to modify the query to access the YaBB user table, and use the appropriate field names. I'm not familiar with YaBB, so I can't help you with that I'm afraid.

cerberus

Quote from: Nibbler on July 20, 2004, 02:44:05 AM
That hack won't work with a bridged install, you would need to modify the query to access the YaBB user table, and use the appropriate field names. I'm not familiar with YaBB, so I can't help you with that I'm afraid.
:o :'(
I've thought that coppermine saves the uploader's name in its own DB.
I'm familiar with YaBB, but not with MySQL :(.
With Best Regards, Cerberus
Edamus, bibamus, gaudeamus.
http://www.pocketpcrussia.com - My Main Site

Nibbler

What the hack tries to do is lookup the user name in the coppermine user table using the owner_id associated with the picture, it doesnt use the owner_name atall. You can try it with the owner_name if you like.

cerberus

Quote from: Nibbler on July 20, 2004, 12:57:53 PM
What the hack tries to do is lookup the user name in the coppermine user table using the owner_id associated with the picture, it doesnt use the owner_name atall. You can try it with the owner_name if you like.
it isn't working :(
I'll have to dig in the bridge and see how it handles owners ::)
With Best Regards, Cerberus
Edamus, bibamus, gaudeamus.
http://www.pocketpcrussia.com - My Main Site