adding "search" and "keywords" elements on top of the main page adding "search" and "keywords" elements on top of the main page
 

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

adding "search" and "keywords" elements on top of the main page

Started by philippefx, August 16, 2010, 05:20:51 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

philippefx

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

papukaija

Quote from: philippefx on August 16, 2010, 05:20:51 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.

philippefx

Quote from: papukaija on August 16, 2010, 05:36:33 PM
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.

Joe Carver

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

Quote from: Joe Carver on August 17, 2010, 11:24:30 AM
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*.

Joe Carver

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


Thanks. This helps me a lot :

Quote from: Joe Carver on August 18, 2010, 12:16:10 AM
- 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 ?


Quote from: Joe Carver on August 18, 2010, 12:16:10 AM
- 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,

Αndré

Quote from: philippefx on August 18, 2010, 02:21:12 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?

philippefx

Quote from: Αndré on September 01, 2010, 04:49:51 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").