Member
Member
Sabyre   2010-10-21, 14:53
#1

I recently realized that if you conduct a search and view one of the results it will make the theme for that album default from then on.

Any idea as to why?

I have say 5 variants of a theme and depending on the album, I use any one of them for the album. However if you view the album from a search result it will put the album theme back to default for the site.

Hpoe I have explained that well enough...

Thanks

Administrator
Administrator
acrylian   2010-10-21, 16:40
#2

Searches do not belong to an album, otherwise layouts would jump around with any album displayed.

Please provide basic infos like what theme and what Zenphoto release.

Member
Member
sbillard   2010-10-21, 17:27
#3

There is a new feature in the nightly builds which would allow you to "theme" your search pages based on some criteria. It is called "multiple_layout".

But I guess I really do not know what criteria you would make. A search can return items from multiple albums. Which theme would you select?

Administrator
Administrator
acrylian   2010-10-21, 17:52
#4

Actually the new multiple_layout plugin will not help as it does not cover normal custom pages like the search page is one directly. Only for the the real items like images, albums, Zenpage pages and categories.

Administrator
Administrator
acrylian   2010-10-22, 08:12
#5

My collegue sbillard accidentally posted his answer on another thread. I copied it over:

Quote:acrlian is right, of course. But the technique used by this plugin could be applied to other pages. Basically it uses a filter to redirect the page load to something else.

So you could register a filter for load_theme_script which would by some means determine what script to load for that instance of the search.

The good news is that doing this does not require the development release as that filter exists already. Your filter would just make an algorithm of what script to load based on the search criteria and return the path to that script.

Member
Member
Sabyre   2011-02-01, 21:42
#6

Basically what is happening is this....

Every album of images can have a specific theme... Lets call it theme2 and lets say the core theme for the rest of the site is theme1.

Lets say you do a search for bumblebees, all the resulting albums that match that search will have its predefined theme2 show up as theme1 from then on.

The only way to fix it is to "edit the album" and resave the theme2 selection.

Member
Member
sbillard   2011-02-02, 01:19
#7

First of all, I am pretty sure your descripton is not correct. Or at least you are usign terminology different from what we are acustomed to.

Album themes apply at only the root level, so every album of images cannot have a specific theme, only root albums can have a specific theme.

Second, nothing in a theme changes Options. Since album themes are stored as options, doing a search cannot change the theme.

So perhpas you would like to try again with your explaination.

Member
Member
Sabyre   2011-02-02, 04:34
#8

ok.. first off yes root albums... I do not use subalbums...

Doing a search most deffinately does change the selected theme for a resulting album from the seleted theme to to the zp core theme...

It does not change the selected theme for the album in the options, however it does display the album from that point forward as the zp core theme instead of the predefined selected theme.

It's like when you do a search the search results are displayed using the core theme, when you click an album to view from that search the album is also displayed in the core theme instead of being displayed as its selected theme, and will continue to be that way from then on unless I manually go in and resave the albums selected theme.

I could absolutely show you on the site but it is an adult site.

Administrator
Administrator
acrylian   2011-02-02, 10:35
#9

Quote:Doing a search most deffinately does change the selected theme for a resulting album from the seleted theme to to the zp core theme...
Of course it uses the core theme since you are not in any specific album but within search results.

Member
Member
Sabyre   2011-02-02, 15:12
#10

Yes but if you click on the results you would be in a specific album and thats where the problem is. The specific albums selected theme is never shown again for that album.

Administrator
Administrator
acrylian   2011-02-02, 15:27
#11

If you click on a search result you are normally still in search result context.

Member
Member
Sabyre   2011-02-02, 17:01
#12

Does that get cached for that album? Perhaps that is what is going on...

If you view that album again not via search but through the typical way say via index or something it still displays the album with the core theme.

Perhaps after being shown via a search it caches that album with the core theme for "x" amount of time?

Member
Member
sbillard   2011-02-02, 19:23
#13

Search context is stored in browser cookies. Unfortunately there is no way to tell if you link to an item from within the search or some other link that is somehow accessable to you while you are in the search context.

Member
Member
sbillard   2011-02-02, 19:23
#14

Search context is stored in browser cookies. Unfortunately there is no way to tell if you link to an item from within the search or some other link that is somehow accessable to you while you are in the search context.

Member
Member
Sabyre   2011-02-03, 16:07
#15

Yup, I tested it all out, that is exactly what is happening.

So there is nothing that can be added that would force it to check if albums have predefined themes?

A php snipit perhaps?

Member
Member
sbillard   2011-02-03, 21:18
#16

You can clear the cookie. But of course knowing when to clear it is the problem since you would have to clear the cookie before any output is sent and before someone clicks on your link.

The only other option I can think of is for the link you present to go to a script that clears the cookie then redirects to the album you want to link to.

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.