![]() |
|
How to include ZP in a site index.php (home) page? - Printable Version +- ZenphotoCMS Forum (https://forum.zenphoto.org) +-- Forum: Support (https://forum.zenphoto.org/forum-1.html) +--- Forum: General support (https://forum.zenphoto.org/forum-4.html) +--- Thread: How to include ZP in a site index.php (home) page? (/thread-7892.html) |
How to include ZP in a site index.php (home) page? - marcov - 2010-11-26 Let's say I install ZP in a /gallery folder, below my site root. The /gallery will contain all the ZP files: index.php, albums.php, etc. The "Gallery" menu entry would call the ZP index.php file so that I can have the full ZP functionality. On my home page I just want to pull thumbs from any single ZP albums folder into my index.php home page. I would do this using the printRandomImages or any other function that would allow me to do that. (Then I would want to display the single images from the thumbs). *** The question is, what do I have to include at the top of my site root index.php file to be able to then use the ZP functions and achieve the above? I searched the user guide and the forum but so far I did not find anything on this. How to include ZP in a site index.php (home) page? - micheall - 2010-11-26 You could try taking a look here. This is the "How to use Zenphoto as a plugin" tutorial. I don't believe it will function right if your main site is built in wordpress though (not sure if that's been fixed). How to include ZP in a site index.php (home) page? - acrylian - 2010-11-26 It is not fixed as it is not our fault. It is because of changes in Wordpress. Wordpress does not call template pages "directly" anymore since 3.x (I think). It calls them through a function which means all global variable contexts Zenphoto needs to work are cleared by doing that. This might be the case with other systems as well. This is nothing we can do to fix since Zenphoto is considered to be a standalone system. Sorry. The only way would be to declare all globals Zenphoto might need within Wordpress (which might require hacking it). Or building workarounds like we do on our homepage (it is btw planned to move the site to Zenphoto only once we find the time). How to include ZP in a site index.php (home) page? - marcov - 2010-11-26 Oh, for now I'd only like to call ZP from a simple index.php file in my site's root folder, not from Wordpress. Is there any way to do that? I mean, If my site index.php has the right includes, couldn't it call and run the ZP functions I need? How to include ZP in a site index.php (home) page? - sbillard - 2010-11-26 Have you looked at the link micheall provided? How to include ZP in a site index.php (home) page? - marcov - 2010-11-26 I did now, thank you micheall for the link, I think that is exactly what I need. I will try it out. How to include ZP in a site index.php (home) page? - acrylian - 2010-11-26 Of course if you use a plain index.php file without any other CMS that should still work. Probably just over explained a little..;-) How to include ZP in a site index.php (home) page? - marcov - 2010-11-29 I tried to display the thumbs for a single album on the index.php page om my ZP insallation; I used
... My index.php works fine if I use the typical loops: ...
... How to include ZP in a site index.php (home) page? - marcov - 2010-11-29 PS. The were added by the forum when I edited the post. I could not further edit it, the forum is extremely slow, it takes minutes to load. How to include ZP in a site index.php (home) page? - acrylian - 2010-11-29 Yes our site is under heavy traffic every now and then and lot of spammer register to the forum to missuse our profile pages as link depository (via Twitter for example). Too bad that they did not read the notes on registering that no one will be able to see that. (I don't know what you mean the forum has added). Anyway, to the topic. What you does and can simply not work. How to include ZP in a site index.php (home) page? - marcov - 2010-11-29 Thank you for the hint. I read the object framework and I tried this: ... standard image loop code that works ... ` "latest"is the name of the individual folder within the ZP "albums" folder. Again, it did not work. By the "forum added" I meant the `` shortcodes in the code. On spammers: your site does a very good job though in getting rid of the spam. If waiting a few minutes is what it takes, no problem. How to include ZP in a site index.php (home) page? - acrylian - 2010-11-29 You have to setup the global for the current album using How to include ZP in a site index.php (home) page? - sbillard - 2010-11-29 Many functions, such as How to include ZP in a site index.php (home) page? - marcov - 2010-11-29 Bingo!!! Here's the code for anybody else who wants to display thumbs from a specific album: ` ... loop code ` |