Previous Thread
Next Thread
Print Thread
Hop To
Joined: Dec 2005
Posts: 122
member
member
Joined: Dec 2005
Posts: 122
i want to make some changes to the RSS feed template than generates the RSS files. i need to insert some php to do some string manipulations. but it seems you can't do that in templates.

how can i fix this??


JakChat.com -- Forums for Indonesia's English-speaking community
Ubuntu-Indonesia.com -- Forums for Indonesia's Ubuntu Users
Joined: Jun 2006
Posts: 16,299
Likes: 116
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,299
Likes: 116
You can use {php}{/php} tags in smarty templates


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum, Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Joined: Dec 2005
Posts: 122
member
member
Joined: Dec 2005
Posts: 122
thanks, i tried it out. unfortunately accessing smarty variables is a problem! manual says to declare them global with the {php} block, but this doesn't seem to work.


JakChat.com -- Forums for Indonesia's English-speaking community
Ubuntu-Indonesia.com -- Forums for Indonesia's Ubuntu Users
Joined: Apr 2007
Posts: 3,940
Likes: 1
SD Offline
Former Developer
Former Developer
Joined: Apr 2007
Posts: 3,940
Likes: 1
you talking about rss_xml.tpl ?

if so, i have modified it many times for my needs on various sites.

example would be to include a thumbnail for certain feeds, kinda like wordpress does for a special topic thumbnail field.

if you could be more specific about what you want there, i'm _sure_ there is a solution.

it might even involve modifying the ubbthreads.inc.php 'generate_rss_feeds' code to supply more smarty variables to the template.

all doable smile

Joined: Dec 2005
Posts: 122
member
member
Joined: Dec 2005
Posts: 122
yep, sird00d, rss_xml.tpl is what i'm trying to change.


at the moment all i want to do is remove the UBB code from the CDATA in the <description>, and also just grab the first paragraph in a post rather than just an arbitary number of characters.



JakChat.com -- Forums for Indonesia's English-speaking community
Ubuntu-Indonesia.com -- Forums for Indonesia's Ubuntu Users

Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
Bots
by Outdoorking - 04/13/2024 5:08 PM
Can you add html to language files?
by Baldeagle - 04/07/2024 2:41 PM
Do I need to rebuild my database?
by Baldeagle - 04/07/2024 2:58 AM
This is not a bug, but a suggestion
by Baldeagle - 04/05/2024 11:25 PM
spam issues
by ECNet - 03/19/2024 11:45 PM
Who's Online Now
2 members (ahmed047, Nightcrawler), 615 guests, and 132 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Stones
Stones
by isaac, August 19
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20230217)