Jump to content

jack2006

New Members
  • Posts

    6
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

jack2006's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. It would be awesome if i knew why it gave me the error. If for example i place test.html in the root directory, i can't navigate to it as it gives me a 404. It looks as if there is some blocking mechanism.
  2. Normally it would but it just gives me a 404 error. In the database there is a table called handles where all the php files and their tpl files are listed I also added the about.php and tpl files there, it has an id # of 47
  3. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <title>{$params.title}</title> <link rel="stylesheet" href="/images/css/style.css" type="text/css" /> <!--[if lt IE 8]><link rel="stylesheet" href="/images/css/ie.css" type="text/css" /><![endif]--> <!--[if lt IE 7]><link rel="stylesheet" href="/images/css/ie6.css" type="text/css" /><![endif]--> <script src="/javascripts/main.js" type="text/javascript"></script> </head> <body class="mainpage"> <div id="header"> <div class="inner"> <h1 class="logo">{$params.sitename} <small>{$params.site_description}</small></h1> <div align="right"> {foreach from=$_PL item=_lname key=_lalias} {if $smarty.session.lang!=$_lalias}<a href="?lang={$_lalias}">{$_lname}</a>{else}{$_lname}{/if} {/foreach} </div> </div> </div> <div id="content"> <form action="/work/enter" class="create-workt" id="new_room" method="post"> <input type="hidden" name="room" value="{$work_alias}" /> <fieldset> <div class="name"> {if $smarty.get.pe} <center><b>{$_lang.Password_is_wrong}</b></center><br /> {/if} <div class="bor"> <input class="name enter-name" id="user_name" maxlength="20" name="username" size="20" type="text" value="{$_lang.Enter_your_name}" onfocus="MchName(this,true,'{$_lang.Enter_your_name}');" onblur="MchName(this,false,'{$_lang.Enter_your_name}');" style="color:#C0C2C5"/> {if $have_pass} <br /> <input class="name enter-name" id="user_name" maxlength="20" name="password" size="20" type="text" value="{$_lang.Password}" onfocus="MchName(this,true,'{$_lang.Password}');" onblur="MchName(this,false,'{$_lang.Password}');" style="color:#C0C2C5"/> {/if} </div> </div> <div align="center"><input type="image" src="/images/design/forms/{$smarty.session.lang}/enter.png" class="btn enter-chat-logic"/></div> </fieldset> </form> </div> <div id="footer"> <p>{$params.copyr} | <a href="mailto:{$params.email}">{$_lang.Contact_us}</a> | <a href="mailto:bug@domain.com">Report Bugs</a> | <a href="/pda/">Mobile Version</a></p> </body> </html>
  4. Ken2k7 So here what i have done as you suggested: about.php <?php $obj['smarty']->assign('file_inc', 'about.tpl'); $obj['smarty']->assign('url', '/about.php'); ?> In tpl <p><a href="{$url}">What is domain.com</a></p> Unfortunately that did not work. I've located the following code that talks about url's and all maybe that will help: // Get the document $document = $obj['tree']->get_item($obj['url']->link); if (!$document) { header("HTTP/1.1 404"); $obj['smarty']->assign('file_inc', 'error404.tpl'); $obj['smarty']->display('error404.tpl'); exit; } if ( $document['isdir'] || $document['pid']!=0 ) { if ( $document['pid']!=0 ) { $parent = $obj['tree']->get_item($document['pid']); } else { $parent = $document; } $parent['items'] = $obj['tree']->get_childrens($parent['id']); $obj['smarty']->assign('document_parent', $parent); } //$path = $obj['tree']->get_path($document['id']); $path = array(); $path2 = $path; $path2[] = $document; $document_not_found = 0; if($document['public']) { foreach($handles as $h) { if((int)$h['id'] == (int)$document['handle']) { require($CFG['path']['process'] . $h['script']); } } } else { header("Location: /"); exit(); } // Checking is not whether to go to the first child element if($document['is_gochild']) { $childs = $obj['tree']->get_childrens($document['id']); if (is_array($childs)) { header("Location: /" . $childs[0]['alias'] . ".html"); exit; } } // Smarty pass some of the variables $obj['smarty']->assign('var', $VAR); $obj['smarty']->assign('cfg', $CFG); $obj['smarty']->assign('handles', $handles); $obj['smarty']->assign('document', $document); $obj['smarty']->assign('path', $path); $obj['smarty']->assign('path2', $path2); $obj['smarty']->assign('url', $obj['url']->url);
  5. I've tried to have this answered on the smarty.net forum and digitalpoint, in the smarty forum i simply did not get an answer (cuz maybe it's to stupid to answer), the other onese did not solve the problem. I have had a lancer write a script for me. He used smarty for it. Everything works fine but i don't know how to ad a link to another page of the site. He tells me that that functionality is not available and if i want it he will charge me for making it. (he has to create a module) After digging around i have managed to figure out how to create a page in the system, I can even call it up within another page, but i don't know how to link to it so it displays independently. (It's an about us page and the link would be in the footer). Here is what i have done so far: I have created both a file called about.php and placed it where all my other php page files are. That file contains the following code <?php $obj['smarty']->assign('file_inc', 'about.tpl'); ?> I then created a file called about.tpl placed it in the templates folder and did my templating in that file. I also included about.tpl in the database alongside the other pages listed in it. Ok so now I would like to link to that file so it displays as domain.com/about.html (or php or anything really). Here is my footer <div id="footer"> <p>{$params.copyr} | <a href="mailto:{$params.email}">{$_lang.Contact_us}</a> | <a href="mailto:bug@domain.com">Report Bugs</a></p> <p><a href="">What is domain.com</a></p> The part i don't know how to do is what to put in here: <p><a href="????????">What is domain.com</a></p> If i just place <a href="http://www.domain.com/about.php"> or any variation thereof (even include path to the file) and i click the link i am not taken to that page but left on my main page. (as if it was a 404 error or something). I've been at this problem for a week and i'm about to go ape$%$% please someone help?
  6. Hi guys this is my first post. After spending a few weeks reading everything I could find i;m basically where i began this problem solving mission. I have run into what appears to be a w/r permission issue on my vps (powervps) and they havent been much help. This began when i first attempted to install elgg on my server. Everything went smooth including upgrading to php 5.2. Once the script was installed i had to set up a data folder outside of the root. I did that without a hitch but when the script ran and tried to upload files to that directory it failed. I changed all permissions to 777 etc. and I managed to get as far as uploading files to the folder but they would refuse to be read back by the script (picture files). So they were on the server in the data folder but the script could not access them to display them. Thats when i gave up on elgg since nobody knew what my problem was and how to fix it. I now have run into a similar issue with virtue mart for joomla. I am setting up a store that will sell virtual goods (mp3 etc.) and virtuemart needs again a folder outside of root to keep the downloadable files in. But again it seems that I can't write to it or read it. When i manually add a file to the folder using ftp it's there but again virutemart fails to read it. (I set up the path in the script correctly to point to that folder). I am stumped i tried everything i could think of to solve this but nothing. I am now thinking it must be some apache restriction which i must enable or something in the htaccess file. Anybody got any ideas, this would actually not only help me but others who are experiancing the same issues in those scripts (there are a few of us). Cheers, Jack
×
×
  • 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.