![]() |
|
How to SELECT * FROM `lxn_menu` WHERE `span_class` = '2017' ??? - Printable Version +- ZenphotoCMS Forum (https://forum.zenphoto.org) +-- Forum: Support (https://forum.zenphoto.org/forum-1.html) +--- Forum: Themes (https://forum.zenphoto.org/forum-5.html) +--- Thread: How to SELECT * FROM `lxn_menu` WHERE `span_class` = '2017' ??? (/thread-12962.html) |
How to SELECT * FROM `lxn_menu` WHERE `span_class` = '2017' ??? - jerzy - 2017-08-02 I think that I can do that by query_single_row and normal SQL but I I'd to do this in recommended way - PersistentObject. Can I have some advices or even better - examples ??? Best Regards - Jerzy How to SELECT * FROM `lxn_menu` WHERE `span_class` = '2017' ??? - fretzl - 2017-08-02 What are you trying to do exactly? How to SELECT * FROM `lxn_menu` WHERE `span_class` = '2017' ??? - jerzy - 2017-08-02 I'd like to write SQL query to loop all menu links with specific class tag for example '2017' (from lxn_menu table). I need it to build function based on cookies to dynamicly display or hide visited album inside menu links How to SELECT * FROM `lxn_menu` WHERE `span_class` = '2017' ??? - acrylian - 2017-08-03 You actually never use the persistenObject class directly. You use the child classes for the actual objects (search the user guide on "object model" and the functions documentation on our site) like albums, images etc. Avoid direct sql queries as much as possible as you are in danger to bypass the rights management. Well you can combine queries with the object model - as the object model does that internally naturally but better avoid this before being familiar. The menu_manager plugin provides functions to get the menu items of an menuset. So better us that in combination with the object classes. Sorry, I can't answer more as I fear I don't fully understand what you are trying to do and why ;-) How to SELECT * FROM `lxn_menu` WHERE `span_class` = '2017' ??? - jerzy - 2017-08-03 Ok, so I'll try to explain the idea. On my site http://mimam.net are old, new and updated albums. These new and updated albums have a red and NEW label on the menu. But not for all viewers because for those who have previously visited these new albums, these albums are old, and for the rest are still new :-) So I have an idea to write a script that checks in the cookies who see if the new page was already seen and if not then it loads in the cookie info about new and updated albums. It would be best to build a menu with the label NEW or without, but I do not think I can handle that and then write a sql script and perhaps jquery. I am very happy with your help and I am very grateful for her, but despite being able to handle php and js and working with WP and Joomla, unfortunately I am not a professional programmer and to understand PersistentObject I am too stupid :-) Although now as I look at this description I am no longer sure that I can do it all, but although I wanted to try it! Thanks a lot! How to SELECT * FROM `lxn_menu` WHERE `span_class` = '2017' ??? - acrylian - 2017-08-03 You will have in any case some work to do as you basically have to modify the whole menu_manager plugin (either a custom version or extra functions using it). To lower you work to do you could also look at the image_album_statistics plugin and its functions. Maybe that fits better as it can list new and updated albums. Additionally there is a flag_thumbnail plugin that can flag album thumbs as new as well. Maybe that is also a way to mark new/update albums. Might require some custom work as well. Hope that helps a bit. How to SELECT * FROM `lxn_menu` WHERE `span_class` = '2017' ??? - jerzy - 2017-08-03 OK, thanks for the ideas, I'll be thinking about it, whatever it is - I'll let you know! How to SELECT * FROM `lxn_menu` WHERE `span_class` = '2017' ??? - acrylian - 2017-08-04 Glad if it helps. There are always several ways to achieve things. And don't forget to later submit your site to the showcase gallery if you like as it looks like a good custom theme example. How to SELECT * FROM `lxn_menu` WHERE `span_class` = '2017' ??? - jerzy - 2017-12-18 Ok, so it's done :-) |