MDN

Go Back   Mambo - Forums Closed for posting > Mambo 3rd Party Addons > Mambots

Reply
 
Thread Tools Search this Thread Display Modes
Old November 15th, 2006, 22:00   #1
theluckyy1
 
Join Date: Nov 2006
Posts: 4
theluckyy1 is on a distinguished road
Default KL_PHP - clicking a link removes my template

I have searched this forum and read every thread over and over.

First I want to say that KL_PHP is a WONDERFUL MAMBOT!!!
I hope this project continues to expand with Joomla 1.5 etc.

I have a probelm where I have my content "collegesports.php" displaying properly. However, my PHP file has a "paging" (next / previous) feature in it.

When you click "NEXT/PREVIOUS" it goes to this URL.
http://freemyspacephotos.com/collegesports.php?page=2

The site can be found here....The content on the homepage is what I am trying to fix.
http://freemyspacephotos.com/

When this happens, the JOOMLA template is LOST/ REMOVED.
  • I have published my mambot
  • I have disabled my WYSIWYG
  • I DO NOT want to use a WRAPPER.
  • I have using code on the "NEXT" as index.php?option=com_content&task=view&id=12&Itemi d=27?page=2

The CollegeSports.php code is below. This PHP is an INCLUDE.

I believe that the PHP is what needs to be modified. Please provide some clues / support to what needs to be done.

Thanks in advance for your SUPPORT.
PHP Code:
<?php $title "Free MySpace Photos College Sports Logo Images Teams"?>

<table width="100%">
  <tr>
    <td>
<?

// Configure these values for your site
$site_url "www.freemyspacephotos.com"// no http, no trailing /
$site_name "Get Free Photos for your web page.";
$support_image "";
// support_image is a logo for your site that will be placed in the top
// left of the users myspace page. Leave this blank if you don't want
// to use a support image.

$cat 'library-images/sports/collegesports/';
$urlpath 'library-images/sports/collegesports/';
$photobucket 's29.photobucket.com/albums/c273/freemyspacehtmlcode/sports/collegesports';

$max2show 25//Amount you want to show per page

// END OF CONFIGURATION SECTION
// Do not edit below this line

$hook opendir($cat) or die('cant open dir');
$total 0;

if(!isset(
$_GET['page'])) $page 1;
else 
$page $_GET['page'];

$start $max2show $page $max2show;
$end $page $max2show;

$ext = array("jpg""png""jpeg""gif""bmp");
while (
false!==($file readdir($hook))) {
    for(
$i=0;$i<sizeof($ext);$i++)
    if (
stristr($file".".$ext[$i])) //NOT case sensitive 
    
{
        
$files[] = $file
        
$total++;
    }
}
closedir($hook);
natcasesort($files);
$files array_values($files);

if (
$end $total) { $end $total; }

echo 
'<table width="100%"  border="0" cellspacing="0" cellpadding="4" border="0" bgcolor="#eeeeee" style="border-bottom: 1px solid #cccccc"><tr>';

//if ($cnt >= $start && $cnt < $end)

if(isset($_GET['page'])&&($_GET['page'] != 1)) {

    
$pre $_GET['page'] - 1;
        echo 
'<td align="left" width="38%"><a href="' $_SERVER['PHP_SELF'] . '?page=' $pre '"><b>Previous Page</b></a></td>';
        }

$pages $total/$max2show;
$lastpage ceil($pages);

echo 
'<td></td>';

if(
$page $lastpage) {

$next $page 1;
echo 
'<td align="right" width="45%"><a href="' $_SERVER['PHP_SELF'] . '?page=' $next '"><b>Next Page</b></a></td>';

    }

echo 
'</tr>
</table><br />'
;

for (
$cnt $start$cnt $end$cnt++) {
    
$file $files[$cnt];

?>    <table border="0" width="100%" align="center" cellpadding="4" cellspacing="4" style="border-bottom: 1px dashed #cccccc">
        <tr>
          <td valign="top" style="padding-right: 10px;" align="right"><a href="<?php echo $urlpath $file?>" target="_blank" title="<?php echo $file?>"><img src="<?php echo $urlpath $file?>" alt="<?php echo $file?>" width="150" height="150"></a></td>
          <td valign="top" align="left"><a href="<?php echo $urlpath $file?>" target="_blank" title="<?php echo $urlpath $file?>"><?php echo $file?></a><br />
            <textarea name="textarea2" cols=23 rows=7 onClick="this.focus();this.select()">
<a href="http://<?php echo $site_url?>" target="_blank" title="<?php echo $site_name?>">
<img src="http://<?php echo $photobucket "/" $file?>" border="0" alt="<?php echo $site_name?>"></a> <br> 
<?php if ($support_image != "") { ?>
<a href="http://<?php echo $site_url?>/" target="_blank" title="Free Photos for your Profile!">
<img src="http://<?php echo $support_image?>" alt="Free Photos for your MySpace Page!" style="position:absolute; left:0px; top: 0px; z-index:9;" border="0"></a>
<?php ?>
<a href="http://<?php echo $site_url?>/" target="_blank" title="Free Myspace Photos!"><?php echo $site_name?></a></textarea>
          </td>
        </tr>
      </table>
<?

}//for

echo '<br /><table width="100%"  border="0" cellspacing="0" cellpadding="4" border="0" bgcolor="#eeeeee" style="border-bottom: 1px solid #cccccc"><tr>';

if(isset(
$_GET['page'])&&($_GET['page'] != 1)) {

    
$pre $_GET['page'] - 1;
        echo 
'<td align="left" width="38%"><a href="' $_SERVER['PHP_SELF'] . '?page=' $pre '"><b>Previous Page</b></a></td>';
        }

echo 
'<td></td>';

if(
$page $lastpage) {

$next $page 1;
echo 
'<td align="right" width="45%"><a href="' $_SERVER['PHP_SELF'] . '?page=' $next '"><b>Next Page</b></a></td>';

    }

echo 
'</tr>
</table>'
;
?>
    </td>
  </tr>
</table>
theluckyy1 is offline   Reply With Quote
Old November 16th, 2006, 06:14   #2
theluckyy1
 
Join Date: Nov 2006
Posts: 4
theluckyy1 is on a distinguished road
Default

From all I have read - I beleive the script is not able to access VARIABLES using _GET _POST _REQUEST etc.


Is that correct? If so, anyone want to help me make a custom MODULE or modify the PHP so it does not use the variables for PAGING and instead print out 1 ,2,3,4,5,6,7,8,9 on the page which have been hard coded links.
theluckyy1 is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Utilizzo avanzato di Web Link component murgy come faccio a...? 11 August 20th, 2006 14:38
1) TOP link 2) Pagina statica: dove??? viand come faccio a...? 3 February 13th, 2006 10:31
Splash page "latest news" module link problem arnj General Questions 1 November 18th, 2005 14:45
Paid Project: Mambo Custom Affililate Link Development janisp Custom Development 0 March 18th, 2005 12:17
Can't get template to be "Default" in 4.5.2.1 cozimek Administration Questions 2 March 15th, 2005 05:51


All times are GMT -7. The time now is 08:15.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.