Jump to content

Smarty Path Problem


russia5

Recommended Posts

I am transferring my site to Smarty and have a path problem.  I have loaded Smarty directly under the root.  Within www.mysite.com/includes/  I have the following files:

 

/includes/ru_config.php");
/includes/ru_connection.php");
/includes/ru_data.php");
/includes/ru_utils.php");

 

I have my home page working great with a gallery of images loaded on it.

 

I have loaded a copy of my home page index.php as well as all other Smarty loads that I have working to create my gallery under the root, to the /members area  - in effort to create the same gallery to the members as I have toward the home page surfers.

 

Here is the members area upload paths:

 

www.mysite.com/members

/templates/index.tpl

/templates/header.tpl

/templates/footer.tpl

/templates/rightmenuhome.tpl

/templates/gallery/member_girl.tpl

/templates/gallery/details.tpl

/libs/ru_smarty.php

/libs/Smarty.class.php

/libs/Config_File.class.php

/libs/pear/

/gallery/ru_member_girl.php

/gallery/ru_details.php

/gallery/pagination.php

/gallery/index.php

/Smarty_Compiler.class.php

/Smarty.class.php

/index.php

 

My /index.php file is as follows:


<?php
require_once("/home/russia5/public_html/includes/ru_config.php");
require_once("/home/russia5/public_html/includes/ru_connection.php");
require_once("/home/russia5/public_html/includes/ru_data.php");
require_once("/home/russia5/public_html/includes/ru_utils.php");
require_once("/home/russia5/public_html/libs/ru_smarty.php");
RU_CheckInject();

//$content = "";
//if (empty($_GET['action']))
//{
//	if (empty($_REQUEST['id'])) 
//		$content = 'gallery/index.php'; 
//	else 
//		$content = 'gallery/index.php'; 
//}
//else
//{
//	switch ($_GET['action']) {
//	case 'subscribe':
//		$content = 'mailer/ru_subscribe.php?subemail=' . $_POST['subemail'];
//	break;
//	case 'unsubscribe':
//		$content = 'mailer/ru_unsubscribe.php?subemail=' . $_POST['subemail'];
//	}
//}
$sql = "select sid, picture1, full_name from " . TBL_PROFILE . " order by sid desc";
$pageno = $_POST['pageno'];
if ($pageno == "") $pageno = 1;
$pagesize = 20;
$pageurl = $_SERVER["PHP_SELF"];
$thepager = RU_Pagination($sql, $pageno, $pagesize, $pageurl);

$smarty = new RuSmarty;
$smarty->assign_by_ref('users', $thepager->itemlist);
$smarty->assign_by_ref('thepager', $thepager);
$smarty->assign('hiddenstr', $hiddenstr);
$smarty->assign("content", $content);
$smarty->display("index.tpl");
?>


 

Here is the /templates/index.tpl

 


<head>
<title>A Russian Sweet</title>
<META NAME="keywords" CONTENT="russian bride, ukrainian bride, russian lady, russian woman, russian women, mail order bride, sexy russian girl ">
<META NAME="description" CONTENT="Introductions of only beautiful Russian mail order brides.  Our Russian Ladies and Ukrainian women want only love and marriage.  Meet a sexy russian girl and make her a Russian bride that will love you.">
<META NAME="author" CONTENT="Greg Ladner">
<META NAME="ROBOTS" CONTENT="ALL">
<link href="stylenew.css" rel="stylesheet" type="text/css">
{literal}
	<style>
	A
	{
	    COLOR: red;
	    FONT-FAMILY: Arial, Verdana, Helvetica;
	    FONT-SIZE: 11px;
	    FONT-WEIGHT: bold;
	    TEXT-DECORATION: none
	}
	A:hover
	{
	    COLOR: #993300;
	    FONT-SIZE: 11px;
	    FONT-WEIGHT: bold;
	    TEXT-DECORATION: none
	}
	</style>
{/literal}
</head>
<body topmargin="0" leftmargin="0" rightmargin="0" link="#FF6633">
<table width="765" border="0" align="center" cellpadding="0" cellspacing="1" height="0%">
    	<tr height="40"> 
		<td bgcolor="white" valign="top">

		</td>
	</tr>
</table>
<table width="765" border="0" align="center" cellpadding="0" cellspacing="1" height="10%">
    	<tr height="1%"> 
		<td valign="top" height="0%">
			<table width="100%" border="0" align="center" cellpadding="3" cellspacing="0" height="0%">
				<tr>
				<td align="center">
					<table align="center" width="95%"  border="0" cellspacing="2" cellpadding="1">
				        {*sid, picture1*}
				        {foreach name=outer item=user from=$users}
						{if $smarty.foreach.outer.index is div by 5}
				        <tr valign="top">
				        {/if}
				          <td width="18%" align="center"><a href="gallery/ru_member_girl.php?id={$user.sid}"><img src="../../images_thumb1/{$user.picture1}" alt="Picture of {$user.full_name}" border="0"></a><br></td>
				        {if ($smarty.foreach.outer.index + 1) is div by 5}
				        </tr>
				        {/if}
				        {/foreach}
				        <tr valign="top">
				          <td class="ulinedtd" colspan="2" align="center">
				          	<script src='js/ru_pagination.js' type='text/javascript'></script>
							{pagination pageurl = $thepager->pageurl pageno = $thepager->pageno pagecount = $thepager->pagecount hiddenstr = $hiddenstr}
						  </td>
				        </tr>
					</table>
				</td>
				<td></td>

        			</tr>
      			</table>
  		</td>
  		<td bgcolor="FF6600" valign="top" height="0%">
			{include file = "rightmenuhome.tpl"}
			<table cellpadding="0" cellspacing="0" border="0"  bgcolor="FF6600">
				<tr>
					<td height="0%" bgcolor="FF6600"> 
					</td>
				</tr>
			</table>
		</td>
	</tr>
</table>
<table width="765" cellpadding="0" cellspacing="0" align="center" border="0" height="0%">
	<tr height="0%">
		<td height="0%">
			{include file = "footer.tpl"}
		</td>
	</tr>
</table>
</body>
</html>


 

I am getting a viewable page, however I am getting x's for the images.  The paths to the images should be:

 

www.mysite.com/images/filename.php

 

The path is:

 

www.mysite.com/member/images/filename.php

 

I deleted the index.tpl from the /member/templates/ and I still get the member index.php page visible with the broken links, hence, /member/index.php Smarty -> display(index.tpl) from someplace else besides the /member/templates/ folder.  I don't know where it would be, because the rightnavbar is missing and it is not missing in the root directory /templates/ 

 

However it makes no difference.  Can anyone see where my path in my two files that I have listed above is wrong. 

 

Where must I change the path so it calls the /member/template/index.tpl 

 

Thanks

 

I noticed that I took out the header on /member/templates/index.tpl and

 

 

 

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/44387-smarty-path-problem/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.