Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: adding "search" and "keywords" elements on top of the main page  (Read 5394 times)

0 Members and 1 Guest are viewing this topic.

philippefx

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 28

Hi,

I tried this : http://photo.grangeneuve.ch/

This looks exactly as I want it to look. I just replaced "index.php" by "search.php" (with an unix soft link).

But it's not really clean. For example, we can't access the albums/categories anymore, and this maybe usefull sometimes, for administration stuff.

I would like to have the same but with the ability to show the albums/categories if we want them. But I don't know what the proper way to achieve this. I read a lot of doc (http://documentation.coppermine-gallery.net/en/theme_theme_php.htm, http://documentation.coppermine-gallery.net/en/theme_examples.htm) but maybe missed the important one ? Those only describe how to change the layout and/or add content. It don't describe how to manipulate coppermine function like "display_search", display_keywords", "display_categories", etc.

Can someone help me, or give me a tip, example site, etc. ? Of cource googling "coppermine theme search" don't give very accurate results :)


Thanks a lot, (...and sorry for my bad english)

Philippe
Logged

papukaija

  • Contributor
  • Coppermine frequent poster
  • ***
  • Country: 00
  • Offline Offline
  • Posts: 333
Re: adding "search" and "keywords" elements on top of the main page
« Reply #1 on: August 16, 2010, 05:36:33 pm »

I tried this : http://photo.grangeneuve.ch/

Is that your gallery? If yes, please upgrade it first. If not, please post a link to your gallery as requested by board rules.
Logged

philippefx

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 28
Re: adding "search" and "keywords" elements on top of the main page
« Reply #2 on: August 17, 2010, 09:29:41 am »

Is that your gallery? If yes, please upgrade it first. If not, please post a link to your gallery as requested by board rules.

Yes it's my gallery. Latest version is installed (1.5.8), but I'm not sure it will matter here.

Gallery : http://photo.grangeneuve.ch/, user / passwd : test / testforum


Thank you for your help.
Logged

Joe Carver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1503
  • aka 'i-imagine'
    • Home Page
Re: adding "search" and "keywords" elements on top of the main page
« Reply #3 on: August 17, 2010, 11:24:30 am »

You could use the option of anycontent.php or a custom header/footer to add search to your pages. That way the main content of your gallery will not be adversely affected.

philippefx

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 28
Re: adding "search" and "keywords" elements on top of the main page
« Reply #4 on: August 17, 2010, 04:46:49 pm »

You could use the option of anycontent.php.

Thanks, that was a good solution. (adding a header or footer is not a good way, I don't want the search engine on all pages).

So, I do the following (see attached anycontent.php.txt) : I copy the content of "search.php" inside "anycontent.php".

But I encounter one problem doing so. You can check the result here : http://photo.grangeneuve.ch/

There is neither header nor icons inside the search form and keyword tab. I don't know why it works for other parts of the document, and not here.

Can somebody help me ? It should be solved in a few second...


Thanks *a lot*.
Logged

Joe Carver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1503
  • aka 'i-imagine'
    • Home Page
Re: adding "search" and "keywords" elements on top of the main page
« Reply #5 on: August 18, 2010, 12:16:10 am »

Since you are venturing into unexplored territory all that I can provide are suggestions. You are off to a fair start, you should not have too much trouble from here.

- make sure that you are including the right language references as does search.php.

- look at the .css and html - you might want to customize the appearance anyway

- remember that you can't just dump a page into a page without using some sort of < div >'s or tables or something defining the boundary between the two.

Work around with it a little, experiment and keep a backup close by, you will do just fine. Remember that you can use Debug and Notices (in Config) as tools to help see what Coppermine might be missing. (don't post it please)

philippefx

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 28
Re: adding "search" and "keywords" elements on top of the main page
« Reply #6 on: August 18, 2010, 02:21:12 pm »


Thanks. This helps me a lot :

- make sure that you are including the right language references as does search.php.
Remember that you can use Debug and Notices (in Config) as tools to help see what Coppermine might be missing.

So the problem is : "Notice line xxx : Undefined variable: lang_search_php" (I got 20~30 such messages about lang_search_php).

I found everything in "include/init.inc..php", lines 319->373, but if I try to include this file I get an error ("Fatal error: Cannot redeclare cpggetmicrotime() (previously declared in /home/www/photo.grangeneuve.ch/include/init.inc.php:27) in /home/www/photo.grangeneuve.ch/include/init.inc.php on line 29")

I saw a var in "search.php" : "define("SEARCH_PHP", true)". I copy this line inside "index.php" and..... it works !! 


The problem I have now is that calling the menu "Album List" (link to "http://photo.grangeneuve.ch/index.php?cat=0") give nothing.

Ok, I just display "anycontent/breadcrumb" in the content of the main page, but a menu named "Album List" should give an album list anyway, no ?


- look at the .css and html - you might want to customize the appearance anyway
- remember that you can't just dump a page into a page without using some sort of < div >'s or tables or something defining the boundary between the two.

Not a problem here. I get stopped by Coppermine coding only.

Maybe I should post this message in the dev forum ? I'm not sure coding issue could be helped/resolved here on the "theme" forum.


Thanks,
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15757
Re: adding "search" and "keywords" elements on top of the main page
« Reply #7 on: September 01, 2010, 04:49:51 pm »

Maybe I should post this message in the dev forum ? I'm not sure coding issue could be helped/resolved here on the "theme" forum.
What problems are left?
Logged

philippefx

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 28
Re: adding "search" and "keywords" elements on top of the main page
« Reply #8 on: September 01, 2010, 05:22:07 pm »

What problems are left?

I will mark this thread as "solved", I have my "search and keywords home page".

And will write a new thread about the pending problem ("soon").
Logged
Pages: [1]   Go Up
 

Page created in 0.023 seconds with 20 queries.