Advanced search  

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

Pages: [1]   Go Down

Author Topic: [Closed]: CPG 1.4.25 - MOD-HACK indexing what user searching  (Read 2574 times)

0 Members and 1 Guest are viewing this topic.

fefed22

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 30
[Closed]: CPG 1.4.25 - MOD-HACK indexing what user searching
« 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
« Last Edit: August 18, 2009, 08:31:19 am by Joachim Müller »
Logged

fefed22

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 30
Re: CPG 1.4.25 - MOD-HACK indexing what user searching
« Reply #1 on: August 14, 2009, 05:02:20 pm »

PART 1

Find
File init.inc.php Line 196

Code: [Select]
# 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

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

You will Create the TABLE
Code: [Select]
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;
Logged

François Keller

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: fr
  • Offline Offline
  • Gender: Male
  • Posts: 9094
  • aka Frantz
    • Ma galerie
Re: CPG 1.4.25 - MOD-HACK indexing what user searching
« Reply #2 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 ?
Logged
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

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 30
Re: CPG 1.4.25 - MOD-HACK indexing what user searching
« Reply #3 on: August 17, 2009, 10:46:12 am »

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

Thanks
Logged

François Keller

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: fr
  • Offline Offline
  • Gender: Male
  • Posts: 9094
  • aka Frantz
    • Ma galerie
Re: CPG 1.4.25 - MOD-HACK indexing what user searching
« Reply #4 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
locking this one
Logged
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
Pages: [1]   Go Up
 

Page created in 0.015 seconds with 19 queries.