-
Notifications
You must be signed in to change notification settings - Fork 1
microblog personalized home page
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.
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/
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');
?>To insert the content of an article on the web page you can use the following code:
<?php
include($_SERVER['DOCUMENT_ROOT'] . "/class/articlesmanagement.php");
PrintArticle(ARTICLE_ID);
?>where:
- ARTICLE_ID is the id of the selected article
This is an exemple that show the last published article content in your web page:
<?php
include($_SERVER['DOCUMENT_ROOT'] . "/class/articlesmanagement.php");
PrintArticle($_GET['id']);
?>This is an exemple that show the first article content in your web page:
<?php
include($_SERVER['DOCUMENT_ROOT'] . "/class/articlesmanagement.php");
PrintArticle('1');
?>