Pages (4):    1 2 3 4   
Administrator
Administrator
acrylian   16-03-2013, 16:28
#11

[i] suppose if I figure out why I have no root folder '/page'[/i]
No, there is no such folder. /page/somethingis the standard url of a static custom theme page. The favorites page is such a page. See also:
http://www.zenphoto.org/news/theming-tutorial#custom-pages-with-the-example-of-archivephp-and-sl

Member
Member
randyjames   16-03-2013, 16:36
#12

Sorry, unable to get the snippet from favoritesHandler.php to display correctly. Basically...

Quote:[a href=[php echo FULL WEB PATH;?]/page/[php echo getOption('favorites_link'); ?] id="favorite_link"][php echo $text; ?][/a]
Hoping this comes down to figuring out why I have no /page root folder.

Member
Member
randyjames   16-03-2013, 16:55
#13

So, just to be clear:

  1. I enabled the favorites plugin
  2. Made no changes in the default settings.
  3. Set some favorites.
  4. There is already a favorites.php page setup in the cloned theme.

I'm assuming the existing default favorites.php page is the custom page Zenp is trying to load with url /page/favorites

(or)

Do I need to create a new custom page based on the archive.php or slideshow.php examples?

My assumption here is that the favorites plugin works by default, assuming the theme has provided that custom page. Since I just enabled favorites, and didn't change anything, I'm wondering if this is a bug in the plugin, or perhaps it only works if the theme is actually the original 'zenpage' theme, and not working due to the clone?

Administrator
Administrator
acrylian   16-03-2013, 17:22
#14

No, archive.php and contact.php are examples. favorites.php is a custom page as well.
/page/something is the standard link assuming you use modrewrite. Otherwise the links would be /?p=something.

Did you look into your logs for errors? Is the favorites link option set?

Member
Member
randyjames   16-03-2013, 17:25
#15

I tried switching to the generic Zenpage theme, and still get the error.

I also examined the favorites.php page which is included in the theme, and it appears to substantially match the archive.php example referenced in the theming tutorial.

The only other issue I can think of here has to do with mod_rewrite. I believe I do have mod_rewrite enabled on my Apache2 installation. However, I did not enable it when I configured the Zenp website I'm developing. Given this reference from the tutorial:

Quote:zenphoto/index.php?p=pagetitle (non mod_rewrite)

or

zenphoto/page/pagetitle (mod_rewrite)
(I'm assuming that since my site has zenphoto as it's root, the 'zenphoto' prefix is not required.)

Could it be the favorites link generated by the handler is providing the mod_rewrite version, when it should be providing:

/index.php?p=favorites

Frankly, I'm reluctant to proceed with attempting to modify the favorites handler without a starting point that works.

Thanks for any suggestions as to how to resolve this.

Member
Member
randyjames   16-03-2013, 17:28
#16

We're overlapping here. I will check the issues you mentioned, and then post what I find. (Thanks for the prompt attention to this.)

Member
Member
randyjames   16-03-2013, 17:48
#17

Apropos...

Quote:Did you look into your logs for errors? Is the favorites link option set?

  1. No errors in the debug log.

  2. The only favorites related options I found were in the favorites plugin config page, and the closest thing I found was 'Link text', which I believe simply sets the label on the menu option. I could not find an option anywhere that addressed the 'favorites link' specifically.

  3. I confirmed that I did not enable the mod_rewrite option in the site setup (which was intentional), and it remains disabled.

However, when I initially setup the website, I also disabled the 'deprecated functions' plugin, thinking I'd prefer to build the site using non-deprecated functions. However, after adding some additional plugins, I found that 'deprecated functions' had been enabled, I presume as a dependency of one of the plugins I added, and all the deprecated functions are enabled.

On the list of deprecated functions that plugin supports, is one:

rewrite_path_zenpage

Which is enabled. I'm wondering if that might explain why I'm getting the mod_rewrite version of the favorites link?

I will wait for your response before posting any more information.
(thanks)

Administrator
Administrator
acrylian   16-03-2013, 18:07
#18

I think I have to pass the link issue to my colleague.

Forgive I don't remember but does any of the links modrewrite/nonmodrewrite work on your site? If so you can edit the sidebar.php of your zenpage theme clone to add a static one of course.

Member
Member
randyjames   16-03-2013, 18:42
#19

Thanks Ac, good idea.

I put a generic link in place of 'printFavoritesLink()' and it worked, got me to the actual favorites page.

Also, checked favoritesHandler.php, and there is a reference to getOption('favorites_linktext') and getOption('favorites_link'). It may just be that the snippet referenced above needs to be modified in some way to take into account whether or not the site is setup to use mod_rewrite or not. Not sure why there isn't an option input on the favorites plugin config page, but since I'm customizing the plugin anyway, I can deal with that.

Sorry if these questions are a little dumb. Since I'm not familiar with the coding environment, I'm trying to avoid tinkering with anything unnecessarily. I think I can now go ahead and setup a clone of favoritesHandler as Sb suggested.

thanks again for your help.

Member
Member
sbillard   17-03-2013, 01:48
#20

Do understand that the favorites plugin will not do what you are looking to do. Instead it is an example of how you can create an "album" object out of thin air.

Favorites works with or without mod_rewrite. But if you change the default for the name of the script page (defaults to "favorites" then you also have to make sure that you have a script of that name. That is pretty much the gist of what acrylian was trying to convey above.

Also, the favorites handler plugin will give arbitrary visitors a 404 error if they try to access it. Pretty hard to maintain a set of favorites if you are not a user. So if you are not logged in, expect that the page is not available.

Pages (4):    1 2 3 4   
  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.