Frontpage coding

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
israelp
Regular
Posts: 7
Joined: Tue Feb 26, 2008 3:55 pm

Frontpage coding

Post by israelp »

Hi: Someone help me find where is located the frontpage. I want to make changes directly into the source code of the page.

Thank you.

israelp
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post by judebert »

The PHP code is index.php and the files it includes (all over the place).

The HTML is in index.tpl, with the entries printed through entries.tpl.

At this point, we've got a plugin or an option for almost everything, though. If you tell us what you're trying to accomplish, we may be able to show you an easy way to do it.
Judebert
---
Website | Wishlist | PayPal
israelp
Regular
Posts: 7
Joined: Tue Feb 26, 2008 3:55 pm

Source code

Post by israelp »

Hi: Thanks for your quick response. You can see my blog at www.capr.org/blog2. When I view the source page with the browser, this is the document I want to modify (but I cannot find it)

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html>
<head>
<title>DERECHO Y TECNOLOGIA </title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
....................................

Thank you.

israelp
mad-manne
Regular
Posts: 42
Joined: Wed Jan 23, 2008 4:56 pm
Location: Marl, Germany
Contact:

Re: Source code

Post by mad-manne »

israelp wrote:When I view the source page with the browser, this is the document I want to modify (but I cannot find it)
Hi israelp,
you will not be able to find what you see in your browser, because this is the result of content that is dynamically generated by the blog-system.
You are only able to edit the according template-files, which hold "representations" for the real content, that will be added by the scripts.
serendipity(like many other "php-systems") uses a so called template-engine to render the final pages, that are then sent to the browser(what you see in the end!)

Here is a brief explanation of template-engines in general ...

Hope this helps you understand the things "going on under the hood",
Manfred.
Try not. Do or do not. There is no try. (YODA)
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post by judebert »

The DOCTYPE can be modified in index.tpl, although I'm not sure that's a good idea.

The <meta> is also in index.tpl, although you can see there that it uses the Smarty variable {$head_charset}. That's actually determined by the options you set in your blog.

The title HTML is also in index.tpl, and it also uses Smarty variables. These variables are set in Serendipity's configuration. To change them, go to your admin page, click "Configuration", and change your blog name and subtitle under "General Options". (No file modifications required!)
Judebert
---
Website | Wishlist | PayPal
Post Reply