RSS 'gallery' feed : title mod + display on all pages

Hi all,

I'm new to Zenphoto but I managed to create my website (mainly a photo gallery with Zenpage to display a few additional pages (About me, news, prints available,...). I modified a template to suite my needs OK.

Great software... Cleanly developped, makes it easy to tweak...

I was not satisfied with the title of the RSS feed in my Google homepage : it only display the name of the gallery. I found that it should at least display the website name. So I modified the core (bad thing, I know).

In /zp-core/rss/rss.php, I changed :
<!--<title><?php echo strip_tags(get_language_string(getOption('gallery_title'), $locale)).' '.strip_tags($albumname); ?></title>-->
to :
<title><?php echo html_encode($_SERVER["HTTP_HOST"]).' - '.strip_tags(get_language_string(getOption('gallery_title'), $locale)).' '.strip_tags($albumname); ?></title>

If anybody knows how do that without hacking the core, I take it...

Furthermore, the RSS feed is only available on the gallery page. It does not show on other pages. I would like to have the RSS 'gallery' feed available on all pages...

I might be able to do that but I would probably hack the core again and I would like to quit that bad slope I'm on... ;)

Thanks,
Karim

Comments

  • acrylian Administrator, Developer
    1) The Gallery name is the website name in Zenphoto terms. If you need the url or else to be show just change the gallery title option. No hacking required.

    2) I don't know what theme you are using but the rss feeds are availble on all pages. At least in the browser address bar. We have also context sensitive feeds for albums etc. You can of course change your theme to include what feed type you wish. See the user guide and documentation.
  • kam Member
    Thanks for your fast answer... Great community...

    1) I modified the 'The life is social' theme. In the back office, 'Options'/'Gallery' page, there are 2 titles : 'gallery title' and 'website title'. The 'gallery title' is used in the RSS feed as the title of the feed.
    As it is also used in my menu, I can not change it to include the website name.
    Maybe I should change the menu instead (but it would also require to change the breadcrumbs, URL rewriting....). Easier (but uglier) to hack the RSS.
    Your insight is welcome if there are other options... ;)
    [Note : I use a french version.]

    You can see that on www.kamphotog.com.

    2) I use printRSSHeaderLink('Gallery',gettext('Gallery RSS')) in my theme's index.php to display the RSS feed. Apparently it filters itself out on any page that is not the 'gallery' page (which sounds rational but does not help me...).
  • acrylian Administrator, Developer
    1) The "website title" refers to something else and is used in the breadcrumb. "Gallery" is generally the term used for the Zenphoto installtion, the Zenphoto website itself. The "website title" refers to the the title of the website in case you use Zenphoto only as the gallery part of your website which uses something else.

    We focus primarily on sites that are run with Zenphoto and the Zenpage CMS plugin alone. Add the name of your website to the gallery title then. If that is not what you need you indeed have to hack the rss feed.

    2) I don't know that theme but some themes use the context sensitive feed for albums or else on other pages. You will have to change the call on those other theme pages.
  • kam Member
    By the way, I also modified some more the /zp-core/rss/rss.php file to correct some character display in my RSS feed (french accentuated characters were :

    (I added some html_encode() on titles)
    `

    printf('%1$s (%2$s)', html_encode(get_language_string($item->get("title"),$locale)), html_encode(get_language_string($albumobj->get("title"),$locale)));

    //Modified by KAM

    // was :

    //printf('%1$s (%2$s)', get_language_string($item->get("title"),$locale), get_language_string($albumobj->get("title"),$locale));

    `

    I could not find (with my limited skills) a better way to correct the display...
  • kam Member
    Acrylian,

    Thanks for your valuable help. I'll try to digest your explanations... and find the best way to do what I want to do ;)

    regarding 2) :
    Do you mean that I need to move the printRSSHeaderLink() call from theme's index.php to the other pages of my theme (album.php,...) ?
    [there is no rss calls/functions in my theme, except the printRSSHeaderLink() call I added in index.php]

    BTW : I can only see your posts (not mines) in this thread...

    Thanks again...
  • acrylian Administrator, Developer
    Yes, you can add that header link to any theme page (as it official theme have as far as I remember). Please read the theming tutorial if you haven't already.

    The html_encode additions are right and indeed missing somehow.

    BTW : I can only see your posts (not mines) in this thread...
    Seen the red note above the form?...
  • kam Member
    Many thanks for your help Acrylian...

    [I did see the red note... Just wondered how you could reply to invisible questions. I guess the force is with you ;)]
  • acrylian Administrator, Developer
    Well, I do see the posts in the backend for moderation of course...;-)
  • vincent3569 Member, Translator
    hi

    I have the same need about rss title
    maybe, a nice improvment of ZenPhoto would be :
    in rss feeds options, give the choice of the rss title :
    use 'gallery title' or 'website title'...
  • acrylian Administrator, Developer
    Open a ticket then.
Sign In or Register to comment.