We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Magpie Output with extra <br />

Development and Programming

lincolnpixel's avatar
lincolnpixel
76 posts
17 years ago
lincolnpixel's avatar lincolnpixel

Hi, i’m trying to display some photogallery thumbnails from a pixelpost photogallery on my site using the Magpie plugin, it seem that everything is working, the problem i’m having is the extra line break tag on the output, like this

<li><a href="http://frankydj.com/photoblog/index.php?showimage=146">_        <img src="http://frankydj.com/photoblog/thumbnails/thumb_20080427163906121_DSC_2994.jpg" alt=""  /><br>_    </a></li>
{exp:weblog:entries weblog="gallery_xml"}
<h1>{title}</h1>
{exp:magpie url="{feed}" limit="10" refresh="720"}
<ul>
{magpie:items}
<li><a href="http://{magpie:link}">{magpie:description}</a></li>
{/magpie:items}
</ul>
{/exp:magpie}
{/exp:weblog:entries}

How can i remove the tag? Thanks

       
Bruce2005's avatar
Bruce2005
536 posts
17 years ago
Bruce2005's avatar Bruce2005

Edited.

Look at the feed, it must be in the description in the rss. Viewing the feed:

<description>
        <img src="http://frankydj.com/photoblog/thumbnails/thumb_20080427163911125_DSC_2886.jpg
"><br/>
    </description>

If you cannot edit the feed, or use backspace? the enclosure url element has a clean url, I use the regular magpie so not sure if the plugin does enclosures? Or use php:

<?php 
$string = "Free stuff
"; 
$newstring = substr($string, 0, -6); 
echo $newstring; 
?>

Removes the tag, the one on the image isn’t right as it should have a space…

       
lincolnpixel's avatar
lincolnpixel
76 posts
17 years ago
lincolnpixel's avatar lincolnpixel

Bruce, thanks, i cant edit directly the feed, where should i use the php code?

       
Bruce2005's avatar
Bruce2005
536 posts
17 years ago
Bruce2005's avatar Bruce2005
$string = "Free stuff
";

The description in there, but is not be best idea, I usually go like:

{magpie:items}
<?php
$desc = '{magpie:description}';
$string = "$desc"; 
$newstring = substr($string, 0, -6); 
?> 
<li><a href="http://{magpie:link}"><?php echo "newstring"; ?></a></li>

This is rough and will cause problems when: There is no break tag. There is a space as there should be. Does magpie plugin do enclosures? That one is without tags…

The extract url plugin may be best bet here..gives you a clean url and you can add the img tag to the template code. .

       
lincolnpixel's avatar
lincolnpixel
76 posts
17 years ago
lincolnpixel's avatar lincolnpixel

Bruce, Thanks a lot for sharing your time, the problem was not the Magpie plugin but the pixelpost photogallery output code, adding the extra <line breaks> tags. Resolved.

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.