RCI:RCI How to create an RCI

From CREpedia

Jump to: navigation, search

RCI parts


  • the RCI call
    • this calls the text of the module
    • /templates/pagename.tpl.php
  • The RCI module
    • this is the text shown at the site of the location of the rci call.
    • usually includes PHP code
    • /includes/runtime/uniquetitle_pagename_pagelocation.php


  • example RCI call code
<!--- Begin RCI code --->
<code>
<?php
//RCI CODE BEGINS
echo $cre_RCI->get('pagename', 'pagelocation');
// RCI CODE ENDS
>?
</code>
<!--- End RCI code --->		 
  • example RCI code module
    • contains
      • flat HTML
      • PHP code


<?php
//RCI CODE BEGINS
global string-x,string-y

$rci = '';   //clear any existing rci's on this page
$rci .='<B>this is the text that is returned' . $string-x . ';
$rci .='<B>this is the text that is returned' . $string-x . ';
return $rci   // spit out the formatted text
// RCI CODE ENDS
>?

Admin RCIs do not use template files, so the RCI CALL code goes right in the .php pages themselves.




Last edited: Friday May 25 2012