Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Old 09-29-2008, 04:32 AM Skinning Problem
Junior Talker

Posts: 1
Name: Neoprene
Trades: 0
I have skinned my site.
This is how the users pick the skins:
Code:
<p>
<a href="setskin.php?skin=1"><img src="01.gif" alt=" "/></a><br/>
<a href="setskin.php?skin=2"><img src="02.gif" alt=" "/></a><br/>
<a href="setskin.php?skin=3"><img src="03.gif" alt=" "/></a><br/>
<a href="setskin.php?skin=4"><img src="04.gif" alt=" "/></a><br/>
<a href="setskin.php?skin=5"><img src="05.gif" alt=" "/></a><br/>
<a href="setskin.php?skin=6"><img src="06.gif" alt=" "/></a>
</p>
This is the setskin file it goes to:
PHP Code:
<?php
if (isset($_GET['skin']) && is_numeric($_GET['skin']) && is_dir('/home/audyrjye/public_html/cisinteract.info/skins/' $_GET['skin'])) {
   
setcookie("myskin"$_GET['skin'], time()+(31*86400));
   
header("Location: /index.php");
}
?>
This is a code.php file included in every page as part of this:
PHP Code:
<?php
$pathtoskins 
"/home/audyrjye/public_html/cisinteract.info/skins/";
$defaultskin 1;
if (isset(
$_COOKIE['myskin']) && file_exists($pathtoskins $_COOKIE['myskin'] . '/stylesheet.css')) {  
   
$styles "/skins/" $_COOKIE['myskin'] . "/stylesheet.css";
} else {
   
$styles "/skins/" $defaultskin "/stylesheet.css";
}
?>
My problem is that I have installed a premade question asking script within a folder called "ask". So, for some bizarre inexplicable reason, the images and files i'm linking to outside of the folder cannot be found unless I type out the whole URL, i.e. http://cisinteract.info/01.gif. HOWEVER, when I type out the whole URL for the setskin thing http://cisinteract.info/setskin?skin=5, it only changes the skins for all the other pages on the site (the ones that are not within the ask folder).
So, I tried uploading all the skins files within the ask folder, however, it is not compatible with the rest of the site! With the skin on the rest of the site changes it does not change and when I change the skin for that page, the rest of the site does not change.
I THINK that the problem here, is within the code.php file:
PHP Code:
if (isset($_COOKIE['myskin']) && file_exists($pathtoskins $_COOKIE['myskin'] . '/stylesheet.css')) {  
   
$styles "/skins/" $_COOKIE['myskin'] . "/stylesheet.css";
} else {
   
$styles "/skins/" $defaultskin "/stylesheet.css";

Even though above that the path to skins, the $style variable = skins, so it autmatically assumes that the skins folder is WITHIN the ask folder.
I tried to change the skins folder to the path to skins adress and even just cisinteract.info/skins but then the skins don't even show up.
I'm so confused and I don't know what to do.
Please help me?
Thank you so much
neoprenebecca is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Reply     « Reply to Skinning Problem
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.33158 seconds with 12 queries