PhotoPost Community

PhotoPost Community (http://www.photopost.com/forum/)
-   Photopost Pro How Do I...? (http://www.photopost.com/forum/photopost-pro-how-do-i/)
-   -   How to add Both Recent and Featured Photos on VB page? (http://www.photopost.com/forum/photopost-pro-how-do-i/140633-how-add-both-recent-featured-photos-vbulletin-page.html)

pengrus August 12th, 2009 08:24 PM

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!

Chuck S August 12th, 2009 09:43 PM

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.

pengrus August 12th, 2009 10:23 PM

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.
and pp_featured.php
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

Chuck S August 13th, 2009 08:21 AM

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.

pengrus August 13th, 2009 02:11 PM

You meant to remove it from inc_features_recent.php, right?

Chuck S August 13th, 2009 05:05 PM

remove all that from the second file you created yes.

pengrus August 14th, 2009 06:39 PM

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?

Chuck S August 14th, 2009 07:12 PM

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


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97