![]() |
|
RewriteRule for sorting out gallery and news - Printable Version +- ZenphotoCMS Forum (https://forum.zenphoto.org) +-- Forum: Support (https://forum.zenphoto.org/forum-1.html) +--- Forum: Plugins (https://forum.zenphoto.org/forum-6.html) +--- Thread: RewriteRule for sorting out gallery and news (/thread-5849.html) Pages:
1
2
|
RewriteRule for sorting out gallery and news - slaattnes - 2009-09-15 Hi How can I use RewriteRule to get something like /index.php?gallery and /index.php?news so that it only shows the albums and the other link only shows the news? Best regards RewriteRule for sorting out gallery and news - acrylian - 2009-09-15 No, you can't because Zenphoto does not generate such links. You would have to hack the core which we of course do not recommend. You can do that of course if you really want but you will be on your own with that. What is actually wrong with our links like RewriteRule for sorting out gallery and news - slaattnes - 2009-09-15 The problem is that it then shows both albums and news. This is because I have CombiNews on I assume(?) And if I turn of CombiNews I wont get a index page that shows both news and albums. My goal is to have a index which shows both albums and news, a gallery link that only shows albums and a news link that only shows news. Any suggestions on how to go on solving that? Thank you for your answers. RewriteRule for sorting out gallery and news - acrylian - 2009-09-15 You can disable the "news on index" option of zenpage-default to get the normal gallery index as the start page. Then you can reach the news page by RewriteRule for sorting out gallery and news - slaattnes - 2009-09-15 How do i disable "news on index"? And how do I show both gallery and news on the same page? RewriteRule for sorting out gallery and news - slaattnes - 2009-09-15 Ops! I found it. Blind there for a minute. RewriteRule for sorting out gallery and news - slaattnes - 2009-09-15 Is it maybe possible to edit the include in index.php to return zenpage_zp_index_news but not for /page/gallery? Something like index.php?p=gallery&news for example. Or put include ('gallery.php', setOptionDefault('zenpage_zp_index_news', true)); or something like that on index.php RewriteRule for sorting out gallery and news - slaattnes - 2009-09-16 What I am trying is to get index with "combinews" (albums and news), gallery without "news on index" (only albums) and news without "combinews" (news without albums). Is that possible? RewriteRule for sorting out gallery and news - acrylian - 2009-09-16 I am not sure if I do understand correctly. by standard Zenphoto as a gallery index pages listing hte top level albums and Zenpage has a kind of news index (the "all news" page). You can of course modify your theme to have both on one page but the problem is they use the same procedure for the pagination so you will get funny results. Therefore it is recommended to have them separated. You can disable the news on index to get the normal gallery index page. You can of course still have the CombiNews enabled for the news page. You can also use the printLatestNews function to print x news exceprts on the index page (It is also capable of showing "combinews"). Maybe that is what you are after and a little easier? RewriteRule for sorting out gallery and news - slaattnes - 2009-09-16 Is it possible to wrap into the code that shows all the albums?
RewriteRule for sorting out gallery and news - acrylian - 2009-09-16 How do you mean, within the albums? No, that function prints an unordered list of its own, but you can use it on the same page of course. (btw "none" is not really a parameter value). RewriteRule for sorting out gallery and news - slaattnes - 2009-09-16 I mean with the album excerpts that are shown on gallery.php. (I copied gallery and points index to gallery1.php) I am thinking on using the same css classes so news are shown in neat small lightblue boxes too. Here is my index: http://trondheimkunsthall.com/temp/ I am not too good in explaining:-P What do you mean with not a value? It says "string $option: "none" for only news articles " in the documentation (http://www.zenphoto.org/documentation/plugins/zenpage/_plugins---zenpage---zenpage-template-functions.php.html) RewriteRule for sorting out gallery and news - acrylian - 2009-09-16
RewriteRule for sorting out gallery and news - slaattnes - 2009-09-17 I read in the documentation: News on index.php But I can't get it to work. I've tried to put the code below div id="content" and other places: `
` RewriteRule for sorting out gallery and news - acrylian - 2009-09-17 The zenpage-default theme is already setup for this. RewriteRule for sorting out gallery and news - slaattnes - 2009-09-17 Mhm I see that the code are already in gallery.php, but how do I go about printing news before the albums? RewriteRule for sorting out gallery and news - acrylian - 2009-09-17 By placing the next_news loop where you want it. I have not tried that because as I said you will get funny results with the pagination. RewriteRule for sorting out gallery and news - JerryE - 2012-03-21 I hate the name of this thread. It addresses a possible solution to a problem instead of the problem itself, thus it was hard to find . I would suggest an alternate title similar to: "Dynamically controlling Combinews." However the thread covers the content I am interested in so I will not create a new thread. There is another thread that also touches on this topic from a different angle: "Recent images in news feed?" The OP presented their (and my) real problem in their 2nd post: Quote:My goal is to have a index which shows both albums and news, a gallery link that only shows albums and a news link that only shows news. After a discussion and confusion, the basic answer was: it can't be done without hacking the core code. Restating the problem and my thoughts on it: I am writing a custom theme. It will have a custom menu and a breadcrumb. I want my theme home page (index.php) to show a list of links to the latest news articles and latest updated albums mixed together and sorted by update time. I want Previous and Next page links for this main index as well. A next_news() loop with Combinews turned on does that just fine. The theme custom menu will have a link for "Just Albums". That link will take you to gallery.php. That page is easily done using a next_album() loop. The theme custom menu will have a link for "Just News Articles". That link will take you to news.php. That page is also easily done using a next_news() loop [i][b] with combinews turned off[/b][/i]. What I think I want is the ability to toggle combinews on and off as desired in the theme code. I started to try this but discovered that As an alternative, maybe an optional parameter on next_news() like parameter 2 on getLatestNews() I do not want to write installation specific core code updates (hacks). As my interim solution, based on a hint from acrylian, I tried turning combinews off and using I apologize for rambling, but after restating the problem a little differently, does anybody have any suggestions on how to approach the problem? RewriteRule for sorting out gallery and news - JerryE - 2012-03-21 OK, I left out out an obvious detail. RewriteRule for sorting out gallery and news - acrylian - 2012-03-21 getLatestNews is not controlled by Combinews as that depends on the parameter set (it does use combinews as you told it to). There is indeed no convenient way to disable combinews for the news loop temporarily. But you can always build anything using the object model directly. Another workaround is to attach a category like "news" to all articles and call that category to get articles only. Anyway for such things you probably should open a ticket. |