Advanced search  

News:

cpg1.5.46 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter recently discovered vulnerabilities. It is important that all users who run version cpg1.5.44 or older update to this latest version as soon as possible.
[more]

Pages: 1 2 3 [4] 5   Go Down

Author Topic: XFeed RSS/Atom feed plugin for CPG 1.5.x  (Read 72559 times)

0 Members and 1 Guest are viewing this topic.

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15415
Re: XFeed RSS/Atom feed plugin for CPG 1.5.x
« Reply #60 on: November 28, 2012, 03:04:11 pm »

At the top of which page?
Logged

Mr.Marco

  • Coppermine newbie
  • Offline Offline
  • Posts: 11
Re: XFeed RSS/Atom feed plugin for CPG 1.5.x
« Reply #61 on: November 28, 2012, 04:01:34 pm »

All pages.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15415
Re: XFeed RSS/Atom feed plugin for CPG 1.5.x
« Reply #62 on: November 28, 2012, 04:30:26 pm »

:o

If you're not able to explain your question more detailed I'm not able to help you. Maybe someone else knows what you're talking of.
Logged

Phill Luckhurst

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4483
    • Windsurf.me
Re: XFeed RSS/Atom feed plugin for CPG 1.5.x
« Reply #63 on: November 28, 2012, 06:55:30 pm »

No idea. What image would you like to move where? Please post a link to your site and a image detailing exactly what you want moved and where. Maybe draw arrows on a screen grab using paint or photoshop etc.

Logged
It is a mistake to think you can solve any major problems just with potatoes.

Mr.Marco

  • Coppermine newbie
  • Offline Offline
  • Posts: 11
Re: XFeed RSS/Atom feed plugin for CPG 1.5.x
« Reply #64 on: November 28, 2012, 07:30:58 pm »

Hi, sorry, now I'm able to tell you better what I mean with a screenshot.
This is my gallery: http://www.funivieminiatura.it/gallery/
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15415
Re: XFeed RSS/Atom feed plugin for CPG 1.5.x
« Reply #65 on: November 29, 2012, 09:49:38 am »

Have a look at codebase.php and you'll find the following line:
Code: [Select]
return $template_header.$html;
$html contains the RSS button, $template_header is your theme's header (everything before {GALLERY} in template.html).

If you want to move the button above the header, change the code to
Code: [Select]
return $html.$template_header;
If you want to place the button in your header, you have to do something like
Code: [Select]
return str_replace('<h3>{GAL_DESCRIPTION}</h3>', '<h3>{GAL_DESCRIPTION}</h3>'.$html, $template_header);
Of course you can also add a new token (e.g. {RSS_BUTTON}) to your theme's template.html file. In this case, you just have to replace that token
Code: [Select]
return str_replace('{RSS_BUTTON}', $html, $template_header);
« Last Edit: November 29, 2012, 01:20:36 pm by Αndré »
Logged

Mr.Marco

  • Coppermine newbie
  • Offline Offline
  • Posts: 11
Re: XFeed RSS/Atom feed plugin for CPG 1.5.x
« Reply #66 on: November 29, 2012, 12:54:43 pm »

Uhm, many thanks for your help, but I get some errors, maybe because my template.html is a little modified by me.
If I change code with
Code: [Select]
return $html.template_header;I get as in the photo in the attachments.
If I change with
Code: [Select]
return str_replace('<h3>{GAL_DESCRIPTION}</h3>', '<h3>{GAL_DESCRIPTION}</h3>'.$html, $template_header);The image disappears.

This is my template.html, do you find some errors?
Code: [Select]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="{LANG_DIR}">
<head>
<meta http-equiv="Content-Type" content="text/html; charset={CHARSET}" />
<meta http-equiv="Pragma" content="no-cache" />
<title>{TITLE}</title>
{META}
<link rel="stylesheet" href="css/coppermine.css" type="text/css" />
<link rel="stylesheet" href="themes/curve/style.css" type="text/css" />
<link rel="shortcut icon" href="favicon.ico" />
<!-- Begin IE6 support -->
<!--[if lt IE 7]>
<style>
body {behavior: url(themes/curve/csshover3.htc );}
.dropmenu li {width: 1px;} .dropmenu li a.firstlevel span.firstlevel {white-space: nowrap;} .main_menu {overflow: auto;}
</style>
<![endif]-->
<!-- End IE6 support -->
{JAVASCRIPT}
<!--
  SVN version info:
  Coppermine version: 1.5.9
  $HeadURL: https://coppermine.svn.sourceforge.net/svnroot/coppermine/trunk/cpg1.5.x/themes/curve/template.html $
  $Revision: 7809 $
-->
</head>
<body>
   
   
       
<div id="cpg_logo_block_outer"><DIV STYLE="position:absolute; top:79px; left:83px"><img src="http://www.funivieminiatura.it/gallery/themes/curve/images/novita.png"></div>         
                <br>
                <h1>{GAL_NAME}</h1>
                <h3>{GAL_DESCRIPTION}</h3>
            <br><br>
<a href="index.php">
<img src="{CUSTOM_HEADER}">
</a>


<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link href="http://www.funivieminiatura.it/gallery/themes/curve/menu/style.css" rel="stylesheet" type="text/css" />
</head>
        <div id="navigation">
<ul>
            <li><a href="http://www.funivieminiatura.it">Home</a></li>
                <li id="active"><a href="http://www.funivieminiatura.it/gallery/">Gallery</a></li>
                <li><a href="http://www.funivieminiatura.it/forum">Forum</a></li>
                <li><a href="http://www.funivieminiatura.it/how-to/">How-To</a></li>
<li><a href="http://www.funivieminiatura.it/utilities/">Utilities</a></li>
                <li><a href="http://www.funivieminiatura.it/simulatori/">Simulatori</a></li>
<li><a href="http://www.funivieminiatura.it/cerca/">Cerca</a></li>
<li><a href="http://www.funivieminiatura.it/links/">Links</a></li>
            <li><a href="http://www.funivieminiatura.it/contatti/">Contatti</a></li>
</ul>
</div>   
</body>
</html>
                   
           
       
</div>   
    <div id="cpg_header_block_outer">
        <div class="cpg_header_block_inner">
            <div id="main_menu">
                    {SYS_MENU}
                    {SUB_MENU}
                    {ADMIN_MENU}


<div align="right">
<form method="get" action="http://www.funivieminiatura.it/gallery/thumbnails.php" name="searchcpg">
<input type="hidden" name="type" value="full">
<input type="hidden" name="title" value="on">
<input type="hidden" name="keywords" value="on">
<input type="hidden" name="album" value="search">
<input type="hidden" name="type" value="AND">
<input type="hidden" name="type" value="full">
<input type="input" style="font-family: Verdana; font-size: 10px; color: #000000" size="16" name="search" maxlength="255" value="" class="textinput">
<input type="image" src="http://www.funivieminiatura.it/gallery/images/icons/search.png">
</form>
</div>


            </div><br><br><br>
           
            {MESSAGE_BLOCK}
        </div>
    </div>
    <div id="cpg_main_block_outer">
        <div class="cpg_main_block_inner">
            {GALLERY}
{CUSTOM_FOOTER}
            {CREDITS}
            <br /> <!-- workaround for issue 64492 - do not remove the line break! -->
        </div>
    </div>
   
</body>
</html>
Logged

Mr.Marco

  • Coppermine newbie
  • Offline Offline
  • Posts: 11
Re: XFeed RSS/Atom feed plugin for CPG 1.5.x
« Reply #67 on: November 29, 2012, 12:56:53 pm »

Sorry, I forgot the photo and I'm not able to edit post :-[
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15415
Re: XFeed RSS/Atom feed plugin for CPG 1.5.x
« Reply #68 on: November 29, 2012, 01:21:38 pm »

I just fixed a typo in my previous post (I accidentally removed the $ in $template_header).
Logged

Mr.Marco

  • Coppermine newbie
  • Offline Offline
  • Posts: 11
Re: XFeed RSS/Atom feed plugin for CPG 1.5.x
« Reply #69 on: November 29, 2012, 01:26:56 pm »

Now with
Code: [Select]
return $html.$template_header;the button remains at its place :-\
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15415
Re: XFeed RSS/Atom feed plugin for CPG 1.5.x
« Reply #70 on: November 29, 2012, 01:29:22 pm »

Your template.html file is invalid, as it contains the html and head tags both twice.
Logged

Mr.Marco

  • Coppermine newbie
  • Offline Offline
  • Posts: 11
Re: XFeed RSS/Atom feed plugin for CPG 1.5.x
« Reply #71 on: November 29, 2012, 02:01:32 pm »

Thanks for information, now I just have got one head tag
Code: [Select]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="{LANG_DIR}">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link href="http://www.funivieminiatura.it/gallery/themes/curve/menu/style.css" rel="stylesheet" type="text/css" />
<meta http-equiv="Content-Type" content="text/html; charset={CHARSET}" />
<meta http-equiv="Pragma" content="no-cache" />
<title>{TITLE}</title>
{META}
<link rel="stylesheet" href="css/coppermine.css" type="text/css" />
<link rel="stylesheet" href="themes/curve/style.css" type="text/css" />
<link rel="shortcut icon" href="favicon.ico" />
<!-- Begin IE6 support -->
<!--[if lt IE 7]>
<style>
body {behavior: url(themes/curve/csshover3.htc );}
.dropmenu li {width: 1px;} .dropmenu li a.firstlevel span.firstlevel {white-space: nowrap;} .main_menu {overflow: auto;}
</style>
<![endif]-->
<!-- End IE6 support -->
{JAVASCRIPT}
<!--
  SVN version info:
  Coppermine version: 1.5.9
  $HeadURL: https://coppermine.svn.sourceforge.net/svnroot/coppermine/trunk/cpg1.5.x/themes/curve/template.html $
  $Revision: 7809 $
-->
</head>
<body>
   
   
       
<div id="cpg_logo_block_outer"><DIV STYLE="position:absolute; top:79px; left:83px"><img src="http://www.funivieminiatura.it/gallery/themes/curve/images/novita.png"></div>         
                <br>
                <h1>{GAL_NAME}</h1>
                <h3>{GAL_DESCRIPTION}</h3>
            <br><br>
<a href="index.php">
<img src="{CUSTOM_HEADER}">
</a>



        <div id="navigation">
<ul>
            <li><a href="http://www.funivieminiatura.it">Home</a></li>
                <li id="active"><a href="http://www.funivieminiatura.it/gallery/">Gallery</a></li>
                <li><a href="http://www.funivieminiatura.it/forum">Forum</a></li>
                <li><a href="http://www.funivieminiatura.it/how-to/">How-To</a></li>
<li><a href="http://www.funivieminiatura.it/utilities/">Utilities</a></li>
                <li><a href="http://www.funivieminiatura.it/simulatori/">Simulatori</a></li>
<li><a href="http://www.funivieminiatura.it/cerca/">Cerca</a></li>
<li><a href="http://www.funivieminiatura.it/links/">Links</a></li>
            <li><a href="http://www.funivieminiatura.it/contatti/">Contatti</a></li>
</ul>
</div>   
</body>
                   
           
       
</div>   
    <div id="cpg_header_block_outer">
        <div class="cpg_header_block_inner">
            <div id="main_menu">
                    {SYS_MENU}
                    {SUB_MENU}
                    {ADMIN_MENU}


<div align="right">
<form method="get" action="http://www.funivieminiatura.it/gallery/thumbnails.php" name="searchcpg">
<input type="hidden" name="type" value="full">
<input type="hidden" name="title" value="on">
<input type="hidden" name="keywords" value="on">
<input type="hidden" name="album" value="search">
<input type="hidden" name="type" value="AND">
<input type="hidden" name="type" value="full">
<input type="input" style="font-family: Verdana; font-size: 10px; color: #000000" size="16" name="search" maxlength="255" value="" class="textinput">
<input type="image" src="http://www.funivieminiatura.it/gallery/images/icons/search.png">
</form>
</div>


            </div><br><br><br>
           
            {MESSAGE_BLOCK}
        </div>
    </div>
    <div id="cpg_main_block_outer">
        <div class="cpg_main_block_inner">
            {GALLERY}
{CUSTOM_FOOTER}
            {CREDITS}
            <br /> <!-- workaround for issue 64492 - do not remove the line break! -->
        </div>
    </div>
   
</body>
</html>
But the problem still continues, I tried you modification on an another "pure" board too and I get the same result... :'(
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15415
Re: XFeed RSS/Atom feed plugin for CPG 1.5.x
« Reply #72 on: November 29, 2012, 02:05:21 pm »

Please attach your whole theme as zip file.
Logged

Mr.Marco

  • Coppermine newbie
  • Offline Offline
  • Posts: 11
Re: XFeed RSS/Atom feed plugin for CPG 1.5.x
« Reply #73 on: November 30, 2012, 02:03:00 pm »

Sure :)
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15415
Re: XFeed RSS/Atom feed plugin for CPG 1.5.x
« Reply #74 on: November 30, 2012, 02:22:09 pm »

All my suggested mods works as expected for me with your theme. It will move the button above the header respectively below the gallery description. Maybe your header image laps over the button, as that image isn't displayed for me.
Logged

biellebrunner

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 42
Re: XFeed RSS/Atom feed plugin for CPG 1.5.x
« Reply #75 on: September 03, 2013, 04:20:18 am »

Hi,
I have a question: how can I get the feed thumbnail link to its corresponding intermediate picture in the gallery?
If needed, my gallery link is: http://stanakaticbrasil.com/galeria
Thanks!
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15415
Re: XFeed RSS/Atom feed plugin for CPG 1.5.x
« Reply #76 on: September 03, 2013, 10:47:32 am »

Open xfeed.php, find
Code: [Select]
echo  htmlspecialchars ("<p><img src=\"$base/".get_pic_url($row, 'thumb')."\" alt=\"{$row['filename']}\" /></p>", ENT_COMPAT, $CONFIG['charset']);and replace with
Code: [Select]
echo  htmlspecialchars ("<p><a href=\"$base/displayimage.php?pid={$row['pid']}\"><img src=\"$base/".get_pic_url($row, 'thumb')."\" alt=\"{$row['filename']}\" /></a></p>", ENT_COMPAT, $CONFIG['charset']);at both occurrences.

I just added that change to the SVN repository in revision 8584.
Logged

biellebrunner

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 42
Re: XFeed RSS/Atom feed plugin for CPG 1.5.x
« Reply #77 on: September 03, 2013, 10:45:04 pm »

Thank you! It worked just fine.
Cheers.
Logged

zan

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
Re: XFeed RSS/Atom feed plugin for CPG 1.5.x
« Reply #78 on: October 10, 2013, 11:17:40 am »

hi there, I'd like to have the album description text included in my RSS output but I just can't figure out how to do it...

Any clues?

Thanks in advance, zan
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15415
Re: XFeed RSS/Atom feed plugin for CPG 1.5.x
« Reply #79 on: October 14, 2013, 04:09:28 pm »

Open xfeed.php, find
Code: [Select]
foreach ($pic_data as $row) {and below, add
Code: [Select]
        if (!isset($album_description[$row['aid']])) {
            $album_description[$row['aid']] = mysql_result(cpg_db_query("SELECT description FROM {$CONFIG['TABLE_ALBUMS']} WHERE aid = {$row['aid']} LIMIT 1"), 0);
        }

find
Code: [Select]
print "\t\t<description>";and below, add
Code: [Select]
echo  htmlspecialchars($album_description[$row['aid']]);
Logged
Pages: 1 2 3 [4] 5   Go Up
 

Page created in 0.022 seconds with 22 queries.