Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Mysidia Adoptables > Questions and Supports

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 03-22-2010, 07:30 PM
Tequila's Avatar
Tequila Tequila is offline
The Grim One
 
Join Date: Jan 2009
Location: Souther Tier, New York State
Posts: 1,356
Gender: Female
Credits: 99,093
Tequila is on a distinguished road
Default :NEWDEFINITION:?

I am adding in a new defined code to show an extra feed (with a php include for news).

The code I have is:
PHP Code:
function getextrafeed(){

include("config.php");

//tada, let's show some news & quick links

$extrafeed = "<table border='0' cellpadding='2' cellspacing='5'><tr><td><?php include('news.php');?></td><td><a href='adopt.php'><img src='http://i46.tinypic.com/wisp51.jpg' border='0' alt='Adopt' title='Adopt' /></a> <a href='profile.php?user=".$loggedinname."'><img src='http://i46.tinypic.com/315e4r6.jpg' border='0' alt='Your Grimoire' title='Your Grimoire' /></a> <a href='pages.php?page=donate'><img src='http://i50.tinypic.com/28ixqbs.jpg' border='0' alt='Donate' title='Donate' /></a></td></tr></table>";


return $extrafeed;

}
Now how do I get it to show in the template, I tried :EXTRAFEED: as a shortcut, but haven't got it to show yet.

Reply With Quote
  #2  
Old 03-23-2010, 12:34 AM
Arianna's Avatar
Arianna Arianna is offline
Dev Staff
 
Join Date: Sep 2009
Posts: 334
Gender: Female
Credits: 21,575
Arianna will become famous soon enough
Default RE: :NEWDEFINITION:?

You have to add it manually to the bottom of each and every template.
I did something like it, too.
The best thing one could do is to get them all to an array (via a getStats function or whatever) and give the array to the prepare function... :P
Reply With Quote
  #3  
Old 03-23-2010, 08:35 AM
Tequila's Avatar
Tequila Tequila is offline
The Grim One
 
Join Date: Jan 2009
Location: Souther Tier, New York State
Posts: 1,356
Gender: Female
Credits: 99,093
Tequila is on a distinguished road
Default RE: :NEWDEFINITION:?

Quote:
Originally Posted by Arianna
You have to add it manually to the bottom of each and every template.
I did something like it, too.
The best thing one could do is to get them all to an array (via a getStats function or whatever) and give the array to the prepare function... :P
Meh, I'm to busy to fight with that, I'll just go about a different way... *yawn* Work sucks...
Reply With Quote
  #4  
Old 03-23-2010, 11:54 PM
Magnie's Avatar
Magnie Magnie is offline
Pythonic
 
Join Date: Dec 2009
Location: Polaris, the Planet
Posts: 34
Gender: Male
Credits: 5,008
Magnie
Send a message via ICQ to Magnie
Default RE: :NEWDEFINITION:?

Well... you will need to replace ':EXTRAFEED:' with:

$article_content = $article_content.$extrafeed;

Otherwise you might need to put it in 'functions.php' where it loads the variable. I'm not fully sure of what you want though, sorry.

Or where you have ':EXTRAFEED:' have:

$efeed = getextrafeed()

$article_content = $article_content.$efeed

which should get the returned variable. :)
Reply With Quote
  #5  
Old 03-24-2010, 06:48 AM
Tequila's Avatar
Tequila Tequila is offline
The Grim One
 
Join Date: Jan 2009
Location: Souther Tier, New York State
Posts: 1,356
Gender: Female
Credits: 99,093
Tequila is on a distinguished road
Default RE: :NEWDEFINITION:?

Quote:
Originally Posted by Magnie
Well... you will need to replace ':EXTRAFEED:' with:

$article_content = $article_content.$extrafeed;

Otherwise you might need to put it in 'functions.php' where it loads the variable. I'm not fully sure of what you want though, sorry.

Or where you have ':EXTRAFEED:' have:

$efeed = getextrafeed()

$article_content = $article_content.$efeed

which should get the returned variable. :)
I'll try that now that I have a day off. We've been super busy for retail.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 11:53 PM.

Currently Active Users: 756 (0 members and 756 guests)
Threads: 4,080, Posts: 32,024, Members: 2,016
Welcome to our newest members, jolob.
BETA





What's New?

What's Hot?

What's Popular?


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
vBCommerce I v2.0.0 Gold ©2010, PixelFX Studios
vBCredits I v2.0.0 Gold ©2010, PixelFX Studios
Emoticons by darkmoon3636