Skip to content

microblog personalized home page

OpenCode edited this page May 4, 2011 · 9 revisions

With Scribble is possible for anyone to create a custom template, easily compatible with the use of very little php code. They were created for this purpose the great features that allow you to print the title of an article, its content, the site name and other information. This allows webmasters to focus primarily on HTML and CSS code without worrying about complicated functions implenterare useful information on the web pages.

How to customize a web page

Structure

To enter your web page to Scribble is necessary to respect some basic rules to allow the script to recognize the desired template.

  • The home page should be renamed article.php;
  • The structure of the web page (pages, css, images folder, other folders) must be contained within the folder scribble/mb/

Article title

To insert the title of an article on the web page you can use the following code:

<?php
   include($_SERVER['DOCUMENT_ROOT'] . "/class/articlesmanagement.php");
   PrintTitle(ARTICLE_ID, HTML_TAG);
?>

where:

  • ARTICLE_ID is the id of the selected article
  • HTML_TAG is the tag selected for the title (f.e. h1, h2, h3, etc....)

This is an exemple that show the last published article title in your web page between <h3> tags:

<?php
   include($_SERVER['DOCUMENT_ROOT'] . "/class/articlesmanagement.php");
   PrintTitle($_GET['id'], 'h3');
?>

This is an exemple that show the first article title in your web page between <h1> tags:

<?php
   include($_SERVER['DOCUMENT_ROOT'] . "/class/articlesmanagement.php");
   PrintTitle('1', 'h1');
?>

Clone this wiki locally