coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 miscellaneous => Topic started by: fefed22 on August 14, 2009, 04:53:08 PM

Title: [Closed]: CPG 1.4.25 - MOD-HACK indexing what user searching
Post by: fefed22 on August 14, 2009, 04:53:08 PM
Hello,

I'm french and i want to continue a MOD who indexing what the user enter in search bar
I've already made my modification on my CPG and i'll post the code here

For the moment it's not complete, i want to coding the page who show the key-list ... not difficult  :P

But i've another problem with the character encoding and the accent but i'll see another day

Thanks
Fred

PS : sorry for my poor english
Title: Re: CPG 1.4.25 - MOD-HACK indexing what user searching
Post by: fefed22 on August 14, 2009, 05:02:20 PM
PART 1

Find
File init.inc.php Line 196

# see http://php.net/mbstring for details

if (function_exists('mb_internal_encoding')) { mb_internal_encoding('UTF-8'); }

$CONFIG['TABLE_PICTURES']   = $CONFIG['TABLE_PREFIX'].'pictures';
$CONFIG['TABLE_ALBUMS']     = $CONFIG['TABLE_PREFIX'].'albums';
$CONFIG['TABLE_COMMENTS']   = $CONFIG['TABLE_PREFIX'].'comments';
$CONFIG['TABLE_CATEGORIES'] = $CONFIG['TABLE_PREFIX'].'categories';
$CONFIG['TABLE_CONFIG']     = $CONFIG['TABLE_PREFIX'].'config';
$CONFIG['TABLE_USERGROUPS'] = $CONFIG['TABLE_PREFIX'].'usergroups';
$CONFIG['TABLE_VOTES']      = $CONFIG['TABLE_PREFIX'].'votes';
$CONFIG['TABLE_USERS']      = $CONFIG['TABLE_PREFIX'].'users';
$CONFIG['TABLE_BANNED']     = $CONFIG['TABLE_PREFIX'].'banned';
$CONFIG['TABLE_EXIF']       = $CONFIG['TABLE_PREFIX'].'exif';
$CONFIG['TABLE_FILETYPES']  = $CONFIG['TABLE_PREFIX'].'filetypes';
$CONFIG['TABLE_ECARDS']     = $CONFIG['TABLE_PREFIX'].'ecards';
$CONFIG['TABLE_TEMPDATA']   = $CONFIG['TABLE_PREFIX'].'temp_data';
$CONFIG['TABLE_FAVPICS']    = $CONFIG['TABLE_PREFIX'].'favpics';
$CONFIG['TABLE_BRIDGE']     = $CONFIG['TABLE_PREFIX'].'bridge';
$CONFIG['TABLE_VOTE_STATS'] = $CONFIG['TABLE_PREFIX'].'vote_stats';
$CONFIG['TABLE_HIT_STATS']  = $CONFIG['TABLE_PREFIX'].'hit_stats';


put after

// search config
$CONFIG['TABLE_SEARCHLOG'] = $CONFIG['TABLE_PREFIX'].'search';


You will Create the TABLE
CREATE TABLE `cpg14x_search` (
  `user_id` varchar(11) NOT NULL default '',
  `user_name` varchar(25) NOT NULL default '',
  `searchterm` text NOT NULL,
  `raw_ip` tinytext,
  `hdr_ip` tinytext,
  `date` datetime NOT NULL default '0000-00-00 00:00:00'
) TYPE=MyISAM;
Title: Re: CPG 1.4.25 - MOD-HACK indexing what user searching
Post by: François Keller on August 14, 2009, 05:32:01 PM
and what is your code doing on this moment ? nothing other that adding a table into the database.
If you are on the way to code a new feature, you probably better code it as a plugin. Will be easyer for update from the gallery.
Not sure it was the better moment to post your unfinished code

Other little thing, if you have problem with your english, did you see the french board (http://forum.coppermine-gallery.net/index.php/board,38.0.html) ?
Title: Re: CPG 1.4.25 - MOD-HACK indexing what user searching
Post by: fefed22 on August 17, 2009, 10:46:12 AM
OK you can lock this thread il will re create in french section

Thanks
Title: Re: CPG 1.4.25 - MOD-HACK indexing what user searching
Post by: François Keller on August 17, 2009, 02:06:49 PM
thread continued in the french board here http://forum.coppermine-gallery.net/index.php/topic,61240.0.html (http://forum.coppermine-gallery.net/index.php/topic,61240.0.html)
locking this one