PhpDig.net

Go Back   PhpDig.net > PhpDig Forums > How-to Forum

Reply
 
Thread Tools
Old 07-18-2005, 06:30 AM   #1
BulForce
Orange Mole
 
Join Date: Aug 2004
Location: none
Posts: 33
Custom XML like tags...?

Hi everybody,

I want to create a custom template tags, for example <phpdig:advertisments/>

I have add the following code to my search.php file

After:
PHP Code:
else {
   die(
"Cannot find search_function.php file.\n");

added this lines:
PHP Code:
if (is_file("$relative_script_path/libs/advertise_functions.php")) {
    include 
"$relative_script_path/libs/advertise_functions.php";
}
else {
   die(
"Cannot find advertise_functions.php file.\n");

I have place this code in advertise_functions.php
PHP Code:
<?php include('../phpadsnew.inc.php'); ?>
The phpadsnew.inc.php is requered from the third part advertise server, in order to serve ads. This file must be included on any page that the ads will be shown. And then on the places where the must be shown i must place this code:
PHP Code:
<?php
    
if (@include('../phpadsnew.inc.php')) {
        if (!isset(
$phpAds_context)) $phpAds_context = array();
        
$phpAds_raw view_raw (''3'''''1'$phpAds_context);
        
$phpAds_context[] = array('!=' => 'bannerid:'.$phpAds_raw['bannerid']);
        echo 
$phpAds_raw['html'];
    }
?>
I have try to make this by just simply put the code in the template file, but it was not parsed by the server and the output was the code itself. So i want to make it like <phpdig:advertisment> and place this tag on the places where the ads must appear.

If anyone know how to make this, please share with me. Also this will be HOWTO for creating and other custom tags.

Thank you.
BulForce is offline   Reply With Quote
Old 07-18-2005, 05:56 PM   #2
Charter
Head Mole
 
Charter's Avatar
 
Join Date: May 2003
Posts: 2,539
http://www.phpdig.net/forum/showthread.php?t=74
http://www.phpdig.net/forum/showthread.php?t=348
__________________
Responses are offered on a voluntary if/as time is available basis, no guarantees. Double posting or bumping threads will not get your question answered any faster. No support via PM or email, responses not guaranteed. Thank you for your comprehension.
Charter is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
IE Issues with exclude and include tags starpogi Troubleshooting 0 03-24-2006 07:15 AM
Where can I find comments for XML-tags... $SMax$ How-to Forum 1 05-03-2005 11:21 AM
input tags and the searchbox steve45king How-to Forum 3 05-31-2004 05:26 PM
How are the Revisit-After META tags processed? sid Troubleshooting 1 11-22-2003 12:50 PM
Indexing META-Tags Rolandks Bug Tracker 7 10-25-2003 07:46 AM


All times are GMT -8. The time now is 08:18 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright © 2001 - 2005, ThinkDing LLC. All Rights Reserved.