PDA

View Full Version : Editting my script


AndrewP
12-14-2006, 10:21 PM
Hi my name is Andrew and i'm new to the forum.

I am looking to edit my directory script to fit in with the new site I am designing.

Only thing is I have no idea of how to do this because I have no experience with editting directory scripts. Any help would be greatly appreciated.

I use dreamweaver to create web pages so it would be great if I could edit my script using dreamweaver so I can see what I am doing rather than needing to know the code.

Thanks :)

Boby
12-14-2006, 11:08 PM
Hello Andrew and welcome :)

It's no big deal to edit the template. Just look into the /templates/ folder and edit the .tpl files to fit your needs.
One thing you should take care of are the Smarty tags that are used by phpLD's template engine. They look almost like regular PHP code, but are between "{" and "}".
Example:
Content visible to registered users only.

All the HTML code can be altered as you wish. I suggest you are using the default phpLD template and edit it.

Boby

AndrewP
12-15-2006, 12:56 AM
Thanks for the reply.

I have installed the default template and am now ready to edit it as you have suggested. Only problem is I don't know what any of the code means.

Is there any GUI software available that allows you to see exactly what you are doing when editting for people who don't know all the coding? I have Dreamweaver but I can't seem to get the template files to show the templates as they really look like so I can edit them easily.

Or do I have to read up and learn the code?

Boby
12-15-2006, 01:31 AM
There is no way to create a GUI and specially no preview for Dreamweaver :(

I agree there are some codes that won't be easy to understand for newbies, but some are easy to interpret {if this > that}show this greater than that message{/if}

If you really want to go deeper into Smarty templating engine, you can take a look at the documentation (http://smarty.php.net/docs.php). But I suggest you just change first HTML code, then you can add more tags or remove by experimenting what each command does.
All you need is a bit of free time, it's really not hard to learn. I've seen here people with no HTML, CSS or PHP experience learning withing a few days.

AndrewP
12-15-2006, 03:39 PM
Ok thanks. I do know a bit of HTML so I should be able to do that. Which files do I need to edit because the .tpl files don't look like HTML to me? There are no <html> or <body> tags like i'm used to.

The templates I am looking at start and end with {strip}

Sorry for sounding like a complete dumbass :p

David
12-15-2006, 03:51 PM
You will most likely start by editing things like header.tpl and footer.tpl
Also note in Dreamweaver you can do Right Click > Open With... > Dreamweaver
While this works, sometimes Dreamweaver likes to add its own code such as css in the header, so you have to be careful.

Boby
12-15-2006, 05:52 PM
Some files include other files, for example all pages share the same header where <html><body> is starting and they share the same footer where you close </body></html>.
This way you edit them just once.

You'll notice for example in main.tpl or submit.tpl that they include the same header:
Content visible to registered users only.

AndrewP
12-15-2006, 07:03 PM
I am starting to get the hang of it now. I have successfully edited header and I have learnt a little bit about changing the main.css. I have a few more questions though

Is there any easy way to make the whole directory 800x600?
How do I change the background colour of the bar which includes 'submit link', 'latest links', 'top links' etc and the search bar? I changed the background colour for #user-bar on the main.css page thinking that was it but this didn't work.
Is there a way to delete the site name and description as I have a logo with the site name and don't require these? I still want the site title to display in the top_bar but not above that.Thanks again for helping a complete novice. Hopefully in the future I will be able to master this and help other people out :)

AndrewP
12-16-2006, 04:52 PM
Content visible to registered users only.

I have now figured out how to do number 3 of the things I need help with. I just need to change everything so its 800 pixels wide and no more instead of filling the entire width of the screen and then how to do the second problem I listed.

Any help would be greatly appreciated

AndrewP
12-16-2006, 07:53 PM
Right, I have now after many hours looking at the code managed to sort out the problems I have been having.

I have put the directory into a table now but after doing this the text has become larger than it should be. I'm not sure why this has happened so any help would be great :)

Go to Directory Project (http://www.directoryproject.net/directory) to take a look at what I have done so far. The directory is not yet open to submissions as I am still in the design phase.

Thanks