مكتبة الشروحات



 تصنيفات المكتبة





 جوال ديموفنف


اشترك الآن في موبايل ديموفنف واستمتع بعالم جديد من الخدمات المتميزة وبسعر رمزي تصلك رسائلنا على موبايلك أينما كنت . تفاصيل


 محول العملات


  • العملة
  • المبلغ بالدولار

Calling a Programming Block



You can call a file and display it inside a block in the magazine by following these steps:

  1. Create a file for the block with php extension, the contents of the file should have the form:
  • This example uses only one value called “YOUR  DATA HERE” this to show that it must be in the variable “content

PHP :
{* php buffer start *} <?php
$content 
="YOUR DATA HERE";
?>
{* php buffer end *}

All the contents you want to show must be in the variable “content”

  • Another example

PHP :
{* php buffer start *} <?php
$content
"hello";
for(
$i=0;$i<10;$i++){
$content .=$i."";
if (
$i==5){
$content .="This is number 5";
}
}
?>
{* php buffer end *}

  1. Upload the php file to “blocks” directory, make sure to change its name to block-xxxx.php, replace xxxx with the file name you wish
  2. After that add a block to the control panel from the path:

Styles & Blocks > Blocks > Add

  • Type a name for the block to be used in the control panel.
  • Title: Appear in the block head when displayed in the site interface, leave it empty to hide the block head.
  • Block Place: Choose where to display the block (Left of the home page, Right of the home page, Center of the home page).
  • Order: Choose the order of displaying the block in the site.
  • Content: leave it empty
  • Block File: Choose the file that you previously uploaded for example: block-xxxx.php

Then press “Submit


هل كانت المقالة مفيدة ؟

أضفة للمفضلة أضفة للمفضلة    طباعة طباعة

اقرأ أيضاً :

Modifying Dimofinf CMS Logo (الزيارات: 4022)

Modifying Dimofinf CMS Logo                 Very important notes before you start...


Installing Dimofinf CMS on Local Server (الزيارات: 6322)

Installing Dimofinf CMS on Local Server...


Add a New File Extension (الزيارات: 4316)

You can use the following steps to add new file extensions to Dimofinf CMS Open...


Changing the Site Favicon (الزيارات: 3862)

Changing the Site Favicon Very Important notes before you start The file format...


Calling an External Content (الزيارات: 3465)

Calling an External Content To call a file and display it in the site follow these steps:...