[Solved]: problem with smf bridge with modpack [Solved]: problem with smf bridge with modpack
 

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

[Solved]: problem with smf bridge with modpack

Started by darkpollo, July 27, 2008, 11:14:56 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

darkpollo

Hi. I have got this old problem:
http://forum.coppermine-gallery.net/index.php/topic,37583.0.html

While executing query "SELECT c.msg_id, c.msg_author, c.msg_body, UNIX_TIMESTAMP(msg_date) AS msg_date, c.author_id, c.author_md5_id, c.msg_raw_ip, c.msg_hdr_ip, c.pid, u.avatar AS avatar_url FROM cpg14x_comments AS c LEFT JOIN `motos_smf`.smf_members AS u ON c.author_id=u.ID_MEMBER WHERE pid='382' ORDER BY c.msg_id ASC" on Resource id #25

mySQL error: No database selected


Fichero: /home/motos/public_html/galeria/include/functions.inc.php - Línea: 248 

Coppermine install:

http://www.todo-motos.es/galeria
Forum install: http://www.todo-motos.es/foros
Coppermine version: 1.4.18(stable)
Forum version: SMF 1.1.5
Test user account: test2 / testtest

URL del foro:      http://www.todo-motos.es/foros
ruta relativa de su archivo de configuración de la aplicación BBS's:    ../foros/
¿Usar grupos basados en POST?:    0
Path where avatars are stored:    avatars
Habilitar/deshabilitar integración con Simple Machines (SMF) 1.x

I have updated to the latest modpack as you suggest on the other topic with no solution.

Thanks


darkpollo


darkpollo

Any news to that error?
Cause the plugin only jumps over it, but something is still broken on the web.

Thanks.

darkpollo

Please, nobody knows how to help me?

Do you need more info?

Thank you.

Nibbler

Look in bridge/udb_base.inc.php for this


function get_comments($pid, $comment_sort_order)

{

global $CONFIG;

if ($this->can_join_tables) {

$sql = "SELECT c.msg_id, c.msg_author, c.msg_body, UNIX_TIMESTAMP(msg_date) AS msg_date, c.author_id, c.author_md5_id, c.msg_raw_ip, c.msg_hdr_ip, c.pid, u.{$this->field['avatar_url']} AS avatar_url FROM {$CONFIG['TABLE_COMMENTS']} AS c LEFT JOIN {$this->usertable} AS u ON c.author_id=u.{$this->field['user_id']} WHERE pid='$pid' ORDER BY c.msg_id $comment_sort_order";



$result = cpg_db_query($sql, $this->link_id);

return $result;

} else { //no join -> we do not get the avatar URL and if needed we need to get it later on in another query

$sql = "SELECT c.msg_id, c.msg_author, c.msg_body, UNIX_TIMESTAMP(msg_date) AS msg_date, c.author_id, c.author_md5_id, c.msg_raw_ip, c.msg_hdr_ip, c.pid FROM {$CONFIG['TABLE_COMMENTS']} AS c WHERE pid='$pid' ORDER BY c.msg_id $comment_sort_order";



$result = cpg_db_query($sql);

return $result;

}

}


and try changing

$result = cpg_db_query($sql, $this->link_id);

to

$result = cpg_db_query($sql);

darkpollo