Webmastersite.net
Register Log In

Templates
Problems editing templates

Comments on Templates

DHowler
Beginner

Usergroup: Customer
Joined: Oct 12, 2005
Location: Florida

Total Topics: 2
Total Comments: 3
DHowler
Posted Oct 12, 2005 - 5:50 PM:

I seem to be having problems editing the templates. Is there a particular editor that you have to edit these TPL files in? I have been using Dreamweaver, and every time I upload I get a Parse error.

Also, I have tried to understand how to add the new fields to a template. I read the manual, but I am still confused.

I am basically trying to put in the new added fields: Genres, Warnings, OtherParings, Recommended_By, Completed, HowlerPoints, Author, and StoryRating into the link's display. I want it to look kind of like this:

http://hp.dhowler.com/news/recs/sample.html

Every time I edit it, it gives me a parse error. I am trying to put it in a table, and it keeps coming up with a message:

If you are not the administrator of this site, please report this page to the administrator. If you are the administrator, please pay careful attention: You have a parse error in your template (or perhaps in your header or footer) which you need to repair before this page can be displayed correctly. The error is picked up on by php at line 329 of the output.

This is what the problematic area of the template looks like during parsing:
Line #324: <script language="JavaScript"> alert("You have a new instant message. Click the sender's name in the IM notification area near the top of the page to join the conversation.") </script>
Line #325: <?php } ?>
Line #326: <?php if (0) { ?><script language="JavaScript">alert("You have a new private message.");</script><?php } ?>
Line #327: </body>
Line #328: </html>
Line #329:

Any help would be appreciated!

DHowler
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Oct 12, 2005 - 10:49 PM:

DHowler wrote:
I have been using Dreamweaver,


A few people in the past have reported that in programs like dreamweaver they were getting certain characters saved incorrectly so that it would break things, until they went to some option to tell their HTML editor to be nice. Try the regular template editor so that you can actually see what you're doing, instead of silently messing everything up in the background while it looks the same.

New fields are automatically added to the 'add' and 'edit' templates. As for display, use their template variable in the place you want them shown. Your sample HTML appears to have the right idea. Now just place all that somewhere within the scope of a link so that link variables logically apply.

Except on view source I see you've killed a number of template variables and virtually all the conditionals by using lowercase, for some reason, when to mean anything they need to be uppercase. And
</if></if><if {thismemberusergroup} is greater than 1 and {thismemberid} {linkownerid}><if {switch_ratings}></if></if><if {thismemberusergroup} is greater than 1 and {thismemberid} {linkownerid}><if {switch_ratings}></if></if></font><if {thismemberusergroup} is greater than 1 and {thismemberid} {linkownerid}><if {switch_ratings}></if></if>

is pure nonsense anywhere, where in the world did you come up with that?
DHowler
Beginner

Usergroup: Customer
Joined: Oct 12, 2005
Location: Florida

Total Topics: 2
Total Comments: 3
DHowler
Posted Oct 13, 2005 - 2:18 AM:

Paul wrote:


A few people in the past have reported that in programs like dreamweaver they were getting certain characters saved incorrectly so that it would break things, until they went to some option to tell their HTML editor to be nice. Try the regular template editor so that you can actually see what you're doing, instead of silently messing everything up in the background while it looks the same.


That may be it. I was using dreamweaver mainly because you could see the design, and that I can make the text bigger to see it.

Paul wrote:
New fields are automatically added to the 'add' and 'edit' templates. As for display, use their template variable in the place you want them shown. Your sample HTML appears to have the right idea. Now just place all that somewhere within the scope of a link so that link variables logically apply.


Yeah, it took me several times to figure out how to make the added fields show up in the submit links, then I had duplicates that I had to edit out. I couldn't find the display links in the template menu, so I called it up where it asks if you want to bring up ____.tpl.

I am having a lot of problems editing templates. I think it's probably because I have never worked with IF statements. I don't know which things need them and which things dont.

Paul wrote:
Except on view source I see you've killed a number of template variables and virtually all the conditionals by using lowercase, for some reason, when to mean anything they need to be uppercase. And
</if></if><if {thismemberusergroup} is greater than 1 and {thismemberid} {linkownerid}><if {switch_ratings}></if></if><if {thismemberusergroup} is greater than 1 and {thismemberid} {linkownerid}><if {switch_ratings}></if></if></font><if {thismemberusergroup} is greater than 1 and {thismemberid} {linkownerid}><if {switch_ratings}></if></if>

is pure nonsense anywhere, where in the world did you come up with that?


Well, I found that in display links, when I did the table I just mainly copied and pasted, but the problem is, I don't use things like uploading files and the likes and I took that out and that may be the problem as well. Do any of the fields for my sample html need IF statements? If so, which ones do?

Dreamy
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Oct 16, 2005 - 1:25 AM:

I couldn't find the display links in the template menu

'Show links in category'

I think it's probably because I have never worked with IF statements. I don't know which things need them and which things dont

Simplified, the things that already have them need them and the things that don't, don't. You need to have a good reason to add or remove them. scripts.webmastersite.net/w...inks/wsnmanual/articles/69

Do any of the fields for my sample html need IF statements?

Are you trying to display any of them in some circumstances but not others?
spiceworld
Member

Usergroup: Customer
Joined: Oct 05, 2005

Total Topics: 10
Total Comments: 35
Posted Oct 16, 2005 - 1:44 PM:

Hi DHowler

I was also having a big problem with the templates, (as Paul found out though my frustration, Sorry Paul wink )

But i think i have now got the hang of it ( www.mrtopsite.co.uk ), i just locked myself in a dark room and tried trial and error tactics.

Don't give up as it is a brilliant script.

Richard
Search thread for
Download thread as
  • 0/5
  • 1
  • 2
  • 3
  • 4
  • 5



This thread is closed, so you cannot post a reply.