![]() |
How to add Both Recent and Featured Photos on VB page? I tried create two modules, one is Featured Photo and the other Recent Photo to add on VB portal page. But I got this error: "Fatal error: Cannot redeclare pp_get_ext() (previously declared in /home/photozo/public_html/album/inc_features.php:41) in /home/photozo/public_html/album/inc_features_recent.php on line 44" How can I fix this and make it work? Thanks in advance for your kind help! |
You can not load the same functions in two different files so from your second file if they are al based after the same code remove the functions in that second file thats all you should need to do. |
Thanks Chuck. I still do not fully understand how to do it. Here is what I am doing now: in inc_features.php, I select $q_switch = "random"; Then I renamed inc_features_recent.php, in which I select $q_switch = "latest"; Then I made two .php files to call these two files for example: pp_recent.php Code: Content visible to verified customers only.Code: Content visible to verified customers only.Apparently, use pp_featured.php and pp_recent.php file at the same time failed. What should I change? Thanks again! Sean |
Sean both of the php files contain functions. You need to remove this from the pp_recent.php file Code: Content visible to verified customers only. |
You meant to remove it from inc_features_recent.php, right? |
remove all that from the second file you created yes. |
Thank you Chuck. That worked. So every time I need to call one of the features like "Random", "Latest", I need to make additional file to call from? |
well yes if your calling things externally or you create one file with different print variables and queries etc. The point really is you cant include functions twice in a page which is why you got that error. |
| All times are GMT -5. The time now is 09:14 AM. |
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0