Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Mysidia Adoptables > Suggestions and Feature Requests

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 01-23-2011, 01:38 PM
HIddenPanda's Avatar
HIddenPanda HIddenPanda is offline
I Am... Da Sheep
 
Join Date: Jul 2010
Posts: 52
Gender: Male
Credits: 5,322
HIddenPanda
Default A Suggestion From A Developer To a Developer

Take This:
PHP Code:
// **********************************************************************
// Begin Template Definition
// **********************************************************************

//Define our current theme
$file $themeurl;

// Do the template changes and echo the ready template
$template file_get_contents($file);

$template replace(':ARTICLETITLE:',$article_title,$template);
$template replace(':ARTICLECONTENT:',$article_content,$template);
$template replace(':ARTICLEDATE:',$article_date,$template);

$template replace(':BROWSERTITLE:',$browsertitle,$template);
$template replace(':SITENAME:',$sitename,$template);

//Define our links

if($cancp == "yes"){

//Admins see a custom set of links here...

$links getadmlinks();

}
else{

$links getlinks();

}

$template replace(':LINKSBAR:',$links,$template);

//Get the content for the side bar...

$sidebar getsidebar();
$template replace(':SIDEFEED:',$sidebar,$template);

//Get the ad content...
$template replace(':ADS:',$ads,$template);

//Get the slogan info
$template replace(':SLOGAN:',$slogan,$template);


echo 
$template;

// **********************************************************************
// End Template Definition
// ********************************************************************** 
And Put it into a file called inc\templatedefn.php

So that way instead of the above in EVERY SINGLE FILE... we just have:
PHP Code:
include('inc\tempdefn.php'); 
at the end of the file :D

This is mainly directed towards HoF and the other Dev Staff

This also makes it alot easier for people who want to add elements to their pages
__________________
dasheep.tk
Reply With Quote
  #2  
Old 01-23-2011, 01:53 PM
Hall of Famer's Avatar
Hall of Famer Hall of Famer is offline
Administrator, Lead Coder
 
Join Date: Dec 2008
Location: South Brunswick
Posts: 4,448
Gender: Male
Credits: 332,067
Hall of Famer is on a distinguished road
Default

Thank you for your suggestion. Arianna has been doing this kind of stuff for the next release Mys v1.2.0, as you will soon see.
__________________


Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site.
Reply With Quote
  #3  
Old 01-23-2011, 01:58 PM
HIddenPanda's Avatar
HIddenPanda HIddenPanda is offline
I Am... Da Sheep
 
Join Date: Jul 2010
Posts: 52
Gender: Male
Credits: 5,322
HIddenPanda
Default

Cool, I just remembered it from when I wanted to write a little news ticker mod but didn't want to make all of the people who wanted to install it go through every single page to insert one little line of code. This way you just add it to this page and the actual template and voila :D
__________________
dasheep.tk
Reply With Quote
  #4  
Old 01-23-2011, 07:13 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: 97,102
Tequila is on a distinguished road
Default

Ooh, I'll see if that makes my problems go away. :)

A news ticker wouldn't be that difficult to add I think.

I've done it in templates with little problems.
__________________
Artist. Designer. Gamer. Mother.
[portfolio] [tarot] [Rune Hollow] [freebies]
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Hello !! New Web Developer here !! nogats07 Newcomer Center 3 06-07-2015 12:59 AM
99webs developer forum Nemesis Webmasters Area 1 08-13-2012 01:57 PM
PKMNS! Hiring Developer Niku Staff Central 1 10-16-2011 04:20 AM
Suggestion RoconzaArt Feedback and Suggestions 2 02-07-2011 09:18 AM
Suggestion RoconzaArt Feedback and Suggestions 5 01-18-2011 12:06 PM


All times are GMT -5. The time now is 04:19 AM.

Currently Active Users: 394 (0 members and 394 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