Jump to content

[SOLVED] $path = $_SERVER["DOCUMENT_ROOT"]."/layout/"; //// Server path to layou


Riseykins

Recommended Posts

Go buy a PHP book or read up on starter tutorials (like on W3Schools and stuff) before you try to code in PHP, trust me. =P

 

EDIT: Also, just contact the guy you bought it from.  He should be able to get you started.

Thanks, BTW. I did get it right in the first place, but I thought I didn't because the script STILL won't work. Ugh, what a piece of shit!

 

Now, I get this:

 

Warning: file(/layout/data/layoutlist.txt) [function.file]: failed to open stream: No such file or directory in /home/fabu/public_html/config.php on line 51

 

O.o I'm pretty angry right now, actually. :( Thanks for the help, guys!

Thanks, BTW. I did get it right in the first place, but I thought I didn't because the script STILL won't work. Ugh, what a piece of shit!

 

Now, I get this:

 

Warning: file(/layout/data/layoutlist.txt) [function.file]: failed to open stream: No such file or directory in /home/fabu/public_html/config.php on line 51

 

O.o I'm pretty angry right now, actually. :( Thanks for the help, guys!

Don't know if any one noticed but the document root is in the error message!

 

Try

$path = "/home/fabu/public_html/layout/"; //// Server path to layout folder

Sorry, guys. I just thought that was kinda rude...I know I'm a n00b, here. But you don't have to deal with me if you don't want...

 

Anyhow, I don't really know how to change things without messing the whole file up...

 

<?

/*

 

Copyright 2007 S. Benjamin

Your Membership grants you the right to use this script

You may modify this script to suit your needs, but you can not resell this script

You are not allowed to give this script away, or resell this script or any part of it.

 

Unauthorized sale or redistribution of this script will result in account

termination without refund, and possible legal actions!

 

Contact info: [email protected]

 

http://www.creativeaftermath.com

 

*/

 

$site_title = "EasyLayoutCMS"; //// Site title

 

$url = "http://www.fabulayouts.com/layout/"; //// URL to layout folder

 

$PBON=0;/// Set to 1 for use with photobucket

 

$PBloc="http://000.photobucket.com/albums/q37/some-folder/";//// Photobucket url

 

$path = $_SERVER["/home/fabu/public_html"]."/layout/"; //// Server path to layout folder

 

$cats_per_row=6; //// Number of categories per nav row

 

$t_cols=30;/// Textarea cols

 

$t_rows=10;/// Textarea rows

 

$thumb_h ="200"; ///thumb height

 

$thumb_w ="250"; ///thumb width

 

$default_cat ="Bling";

 

$ext = ".css"; ///css file extention IE: ".php" for MSRS layouts

 

$items_per =5;///items per page.

 

$show_ad=2;///show ad after so many layouts, edit your add via ad.php

 

$l_header = './header.php'; //// Header File

 

$l_footer = './footer.php'; //// Footer File

/////////////////////////////////////////////////////////////////////////////

 

$layoutlist = file($path."data/layoutlist.txt");

$searchform = "<form method=\"get\" action =\"".$site_url."search.php\"><b>Layout Search:</b> <input type=\"text\" name=\"term\" size=\"30\"> <input type=\"submit\" value=\"Search Layouts\"></form>";

?>

 

 

DarkWater and jonsjava quit the snide comments. If you've got nothing useful/helpful to say don't reply.

 

I will lock this thread if any more snide comments arise.

 

@Riseykins watch the language too.

actually I didn't notice. GAAHH! I need to stop doig 5 things at once. Sry, should have seen that.

<?php
$site_title = "EasyLayoutCMS"; //// Site title
$url = "http://www.fabulayouts.com/layout/"; //// URL to layout folder
$PBON=0;/// Set to 1 for use with photobucket
$PBloc="http://000.photobucket.com/albums/q37/some-folder/";//// Photobucket url
$path = "/home/fabu/public_html/layout/"; //// Server path to layout folder
$cats_per_row=6; //// Number of categories per nav row
$t_cols=30;/// Textarea cols
$t_rows=10;/// Textarea rows
$thumb_h ="200"; ///thumb height
$thumb_w ="250"; ///thumb width
$default_cat ="Bling";
$ext = ".css"; ///css file extention IE: ".php" for MSRS layouts
$items_per =5;///items per page.
$show_ad=2;///show ad after so many layouts, edit your add via ad.php
$l_header = './header.php'; //// Header File
$l_footer = './footer.php'; //// Footer File
/////////////////////////////////////////////////////////////////////////////
$layoutlist = file($path."data/layoutlist.txt");
$searchform = "<form method=\"get\" action =\"".$site_url."search.php\">Layout Search: <input type=\"text\" name=\"term\" size=\"30\"> <input type=\"submit\" value=\"Search Layouts\"></form>";
?>

and in my defense. I wasn't being snide. I was trying to show him that we are helpful, and not to judge us by one comment.

DarkWater and jonsjava quit the snide comments. If you've got nothing useful/helpful to say don't reply.

 

I will lock this thread if any more snide comments arise.

 

@darkfreaks watch the language too.

 

I wasn't being snide at all... =/  If you really think that I meant to be derogatory with that remark, whatever, but I wasn't.

Could you guys help me with this part of the script, too? This is from three different files...

 

<?php

$gcount = $layoutlist;

array_shift($gcount);

echo "<br /><br /><p><b>We currently have <span style=\"text-decoration:underline;font-size:12pt;\">".count($gcount)."</span> MySpace layouts in this category!</b></p>";

?>

 

 

 

<?php

 

$linkitems = 6;

 

$per_cell = 3;

 

$links = $layoutlist;

 

array_shift($links);

 

$countlisted = count($links);

 

if($countlisted>$linkitems){

 

$rand_keys = array_rand($links, $linkitems);

 

$i = 0;

echo "<table width=\"100%\"><tr><td>";

while ($i <= $linkitems-1) {

list($dir, $layout) = explode("/", $links[$rand_keys[$i]]);

$layout = trim($layout);

$layoutstrip = preg_replace('/[^a-zA-Z]/i', ' ', $layout);

$dir = trim($dir);

if($i % $per_cell ==0){

echo "</td><td>";

}

echo "<a href=\"".$url."preview.php?cat=".$dir."&layout=".$layout."\" title=\"".$layout." layout\" target=\"_blank\">".ucfirst($layoutstrip)." Layout</a><br>\n";

$i++;

}

 

echo "</td></tr></table>";

}

?>

 

 

 

<?php

 

if($PBON == 1)

$site_url = $PBloc;

else $site_url = $url;

 

$thumbitems = 4;

 

$thumbs = $layoutlist;

 

array_shift($thumbs);

 

if(count($thumbs)>$thumbitems){

 

$rand_keys = array_rand($thumbs, $thumbitems);

 

$i = 0;

 

while ($i <= $thumbitems-1) {

list($dir, $layout) = explode("/", $thumbs[$rand_keys[$i]]);

$layout = trim($layout);

$dir = trim($dir);

echo "<a href=\"".$url."preview.php?cat=".$dir."&layout=".$layout."\" title=\"".$layout." layout\" target=\"_blank\"><img src=\"".$site_url."cat/".$dir."/".$layout."/thumb.jpg\" width=\"125\" height=\"100\" alt=\"".$layout." layout\" border=\"0\"></a>\n";

$i++;

}

}

?>

 

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.