XFeed RSS/Atom feed plugin for CPG 1.5.x - Page 4 XFeed RSS/Atom feed plugin for CPG 1.5.x - Page 4
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

XFeed RSS/Atom feed plugin for CPG 1.5.x

Started by Aditya Mooley, August 14, 2009, 11:39:17 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Αndré



Αndré

: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.

phill104

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.

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

Mr.Marco

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/

Αndré

#65
Have a look at codebase.php and you'll find the following line:
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
return $html.$template_header;

If you want to place the button in your header, you have to do something like
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
return str_replace('{RSS_BUTTON}', $html, $template_header);

Mr.Marco

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
return $html.template_header;
I get as in the photo in the attachments.
If I change with
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?
<!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>

Mr.Marco

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

Αndré

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

Mr.Marco

Now with
return $html.$template_header;
the button remains at its place :-\

Αndré

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

Mr.Marco

Thanks for information, now I just have got one head tag
<!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... :'(

Αndré

Please attach your whole theme as zip file.

Mr.Marco


Αndré

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.

biellebrunner

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!

Αndré

Open xfeed.php, find
echo  htmlspecialchars ("<p><img src=\"$base/".get_pic_url($row, 'thumb')."\" alt=\"{$row['filename']}\" /></p>", ENT_COMPAT, $CONFIG['charset']);
and replace with
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.

biellebrunner


zan

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

Αndré

Open xfeed.php, find
foreach ($pic_data as $row) {
and below, add
        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
print "\t\t<description>";
and below, add
echo  htmlspecialchars($album_description[$row['aid']]);