[Closed]: CPG 1.4.25 - MOD-HACK indexing what user searching [Closed]: CPG 1.4.25 - MOD-HACK indexing what user searching
 

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

[Closed]: CPG 1.4.25 - MOD-HACK indexing what user searching

Started by fefed22, August 14, 2009, 04:53:08 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

fefed22

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

fefed22

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;

François Keller

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 ?
Avez vous lu la DOC ? la FAQ ? et cherché sur le forum avant de poster ?
Did you read the DOC ? the FAQ ? and search the board before posting ?
Mon Blog

fefed22

OK you can lock this thread il will re create in french section

Thanks

François Keller

Avez vous lu la DOC ? la FAQ ? et cherché sur le forum avant de poster ?
Did you read the DOC ? the FAQ ? and search the board before posting ?
Mon Blog