Welcome to the E-Blah Community!
We would like to welcome you to our community and invite you to register an account or login.
Being a registered member is important, as it gives you several advantages over the normal Guest status. After registering you will be able to download files and images, post messages, and access member-only portions of the forum - just to name a few. Registration is quick and simple, and only takes about a minute of your time.

E-Blah Community    Modifications    Modification Archive  ›  Dynamic Templates Moderators: 10 Series Support Team
Users Browsing Forum
No Members and 1 Guests

Dynamic Templates  This thread currently has 3,902 views. Print
2 Pages 1 2 » Recommend Thread
Justin
September 26, 2005, 9:14pm Report to Moderator Report to Moderator

The E-Blah Developer
E-Blah Programmer
Posts: 15,000
Gender: Male
Posts Per Day: 6.79
Reputation: 93.38%
Reputation Score: +296 / -21
Time Online: 36 days 16 hours 47 minutes
Location: Tallassee, AL
Age: 21
If you want to make a "dynamic" template, here's a little bit of how you can do it.  It works and all, just everything's got to fit on one line.

Search for the following in Routines.pl:

Code
	while(<TEMP>) {
$_ =~ s/<blah v="\$(.+?)">/${$1}/gsi;


Add this after:

Code
		if($_ =~ s/<blahS (.+?)(\|(.+?))?=='(.+?)'>(.+?)<\/blahS>/<blahS$1>/) {
$change = $5;
$_ =~ s/<blahS$1>/$change/ if(${$1}{$3} eq $4 || $1 eq $4);
}


Now for how to use it.  If you want a variable like $URL{'v'} (this is the equivlent of v-{blahblah} in the URL) you'll use <blahS URL|v=='search'>{text goes here}</blahS>.  Obviously the | is for hashes.  If you just want a variable, like $v, just do <blahS v='search'>{text goes here}</blahS> ... this is pretty good if you want to make a huge banner, for instance, when someone gets a new Private Message and you don't want to edit the actual code.


I do installs for $25 and upgrades for $20.
Technical support is always free.

  Donate to E-Blah!  

My Websites: Revolution Reality (My Blog)  |  MinistryTalk.com  |  Portfolio

"But you, O Lord, are a compassionate and gracious God, slow to anger, abounding in love and faithfulness." — Psalm 86:15 NIV


Revision History (2 edits)
admin  -  November 29, 2005, 5:46pm
admin  -  September 26, 2005, 9:15pm
Logged Offline
Site Site Private Message Private message
sohail
September 27, 2005, 7:32am Report to Moderator Report to Moderator
E-Blah Member
Posts: 6
Posts Per Day: 0.01
Reputation: 100.00%
Reputation Score: +1 / -0
Time Online: 1 hours 48 minutes
very nice work hope u will share sach a nice tips and tricks and future too [face=Times][/face]
Logged Offline
Private Message Private message Reply: 1 - 24
stonedtseller
October 27, 2005, 6:42pm Report to Moderator Report to Moderator
Guest User
what is the purpose of a dynamic template?
Logged
E-mail E-mail Reply: 2 - 24
Justin
October 27, 2005, 8:07pm Report to Moderator Report to Moderator

The E-Blah Developer
E-Blah Programmer
Posts: 15,000
Gender: Male
Posts Per Day: 6.79
Reputation: 93.38%
Reputation Score: +296 / -21
Time Online: 36 days 16 hours 47 minutes
Location: Tallassee, AL
Age: 21
You can make it so if you are on, say for instance, the search page you can display information on the search page without editing the source code.


I do installs for $25 and upgrades for $20.
Technical support is always free.

  Donate to E-Blah!  

My Websites: Revolution Reality (My Blog)  |  MinistryTalk.com  |  Portfolio

"But you, O Lord, are a compassionate and gracious God, slow to anger, abounding in love and faithfulness." — Psalm 86:15 NIV

Logged Offline
Site Site Private Message Private message Reply: 3 - 24
maxy
June 2, 2006, 8:55am Report to Moderator Report to Moderator
E-Blah Member
Posts: 34
Posts Per Day: 0.03
Time Online: 5 hours 15 minutes
can I also use it to insert some custom text in the <head> </head> of the search page ?
Logged Offline
Private Message Private message Reply: 4 - 24
Justin
June 2, 2006, 9:04am Report to Moderator Report to Moderator

The E-Blah Developer
E-Blah Programmer
Posts: 15,000
Gender: Male
Posts Per Day: 6.79
Reputation: 93.38%
Reputation Score: +296 / -21
Time Online: 36 days 16 hours 47 minutes
Location: Tallassee, AL
Age: 21
Yes.


I do installs for $25 and upgrades for $20.
Technical support is always free.

  Donate to E-Blah!  

My Websites: Revolution Reality (My Blog)  |  MinistryTalk.com  |  Portfolio

"But you, O Lord, are a compassionate and gracious God, slow to anger, abounding in love and faithfulness." — Psalm 86:15 NIV

Logged Offline
Site Site Private Message Private message Reply: 5 - 24
maxy
June 2, 2006, 9:27am Report to Moderator Report to Moderator
E-Blah Member
Posts: 34
Posts Per Day: 0.03
Time Online: 5 hours 15 minutes
can you guide me a bit that how to do it?
basically I just want to add some custom meta tags in the search/register page

Thanks
Logged Offline
Private Message Private message Reply: 6 - 24
maxy
June 3, 2006, 9:48am Report to Moderator Report to Moderator
E-Blah Member
Posts: 34
Posts Per Day: 0.03
Time Online: 5 hours 15 minutes
any help ..    
Logged Offline
Private Message Private message Reply: 7 - 24
Justin
June 3, 2006, 10:24pm Report to Moderator Report to Moderator

The E-Blah Developer
E-Blah Programmer
Posts: 15,000
Gender: Male
Posts Per Day: 6.79
Reputation: 93.38%
Reputation Score: +296 / -21
Time Online: 36 days 16 hours 47 minutes
Location: Tallassee, AL
Age: 21
<blahS v=='search'>some stuff to do ...</blahS>


I do installs for $25 and upgrades for $20.
Technical support is always free.

  Donate to E-Blah!  

My Websites: Revolution Reality (My Blog)  |  MinistryTalk.com  |  Portfolio

"But you, O Lord, are a compassionate and gracious God, slow to anger, abounding in love and faithfulness." — Psalm 86:15 NIV

Logged Offline
Site Site Private Message Private message Reply: 8 - 24
maxy
June 4, 2006, 12:25am Report to Moderator Report to Moderator
E-Blah Member
Posts: 34
Posts Per Day: 0.03
Time Online: 5 hours 15 minutes
Quoted from Justin
<blahS v=='search'>some stuff to do ...</blahS>


where would I add it?
Logged Offline
Private Message Private message Reply: 9 - 24
Justin
June 5, 2006, 5:47am Report to Moderator Report to Moderator

The E-Blah Developer
E-Blah Programmer
Posts: 15,000
Gender: Male
Posts Per Day: 6.79
Reputation: 93.38%
Reputation Score: +296 / -21
Time Online: 36 days 16 hours 47 minutes
Location: Tallassee, AL
Age: 21
Wherever you want "some stuff to do" to appear ...


I do installs for $25 and upgrades for $20.
Technical support is always free.

  Donate to E-Blah!  

My Websites: Revolution Reality (My Blog)  |  MinistryTalk.com  |  Portfolio

"But you, O Lord, are a compassionate and gracious God, slow to anger, abounding in love and faithfulness." — Psalm 86:15 NIV

Logged Offline
Site Site Private Message Private message Reply: 10 - 24
maxy
June 5, 2006, 10:43am Report to Moderator Report to Moderator
E-Blah Member
Posts: 34
Posts Per Day: 0.03
Time Online: 5 hours 15 minutes
Quoted from Justin
Wherever you want "some stuff to do" to appear ...


OK I have added this code

Code

if($_ =~ s/<blahS (.+?)(\|(.+?))?=='(.+?)'>(.+?)<\/blahS>/<blahS$1>/) {
$change = $5;
$_ =~ s/<blahS$1>/$change/ if(${$1}{$3} eq $4 || $1 eq $4);
}


in the routines.pl file, now in which file and where do I add the <blahS v=='search'>some stuff to do ...</blahS>   ??

I want  "some stuff to do .." to appear in the <head> &</head> tags of the search page

Thanks
Logged Offline
Private Message Private message Reply: 11 - 24
Justin
June 5, 2006, 10:47am Report to Moderator Report to Moderator

The E-Blah Developer
E-Blah Programmer
Posts: 15,000
Gender: Male
Posts Per Day: 6.79
Reputation: 93.38%
Reputation Score: +296 / -21
Time Online: 36 days 16 hours 47 minutes
Location: Tallassee, AL
Age: 21
Add it between the head tags ...


I do installs for $25 and upgrades for $20.
Technical support is always free.

  Donate to E-Blah!  

My Websites: Revolution Reality (My Blog)  |  MinistryTalk.com  |  Portfolio

"But you, O Lord, are a compassionate and gracious God, slow to anger, abounding in love and faithfulness." — Psalm 86:15 NIV

Logged Offline
Site Site Private Message Private message Reply: 12 - 24
maxy
June 5, 2006, 12:41pm Report to Moderator Report to Moderator
E-Blah Member
Posts: 34
Posts Per Day: 0.03
Time Online: 5 hours 15 minutes
Quoted from Justin
Add it between the head tags ...


Of the main template file ?

I have done so and it isn't working, I am just seeing an extra <blahSv> in the header now
btw I am running  E-Blah Platinum 8.2
Logged Offline
Private Message Private message Reply: 13 - 24
Justin
June 5, 2006, 3:29pm Report to Moderator Report to Moderator

The E-Blah Developer
E-Blah Programmer
Posts: 15,000
Gender: Male
Posts Per Day: 6.79
Reputation: 93.38%
Reputation Score: +296 / -21
Time Online: 36 days 16 hours 47 minutes
Location: Tallassee, AL
Age: 21
View the source, and see what it's doing.


I do installs for $25 and upgrades for $20.
Technical support is always free.

  Donate to E-Blah!  

My Websites: Revolution Reality (My Blog)  |  MinistryTalk.com  |  Portfolio

"But you, O Lord, are a compassionate and gracious God, slow to anger, abounding in love and faithfulness." — Psalm 86:15 NIV

Logged Offline
Site Site Private Message Private message Reply: 14 - 24
2 Pages 1 2 » Recommend Thread
Print

E-Blah Community    Modifications    Modification Archive  ›  Dynamic Templates