Jump to content

Help with MySpace layout cms


erin-k

Recommended Posts

Hi  :)

I'm not too sure if this is the right section of the forum to post this in.

I purchased a MySpace layout cms from easylayoutcms [dot] com and if you look at the demo, it shows each layout one underneath the other.

I would like the layouts to display like this (Quickly hand coded this to show as an example):

screenshotqe2.gif

 

So the layout code is no longer shown (I can remove that myself) and there are three layouts per row. I have absolutely no idea how to do this (the three layouts per row thing) as I am a complete PHP newbie.

Also, the layout categories which are displayed above the layouts, are in a random order. I don't know how I would get them to show alphabetically so the users of my site can find a particular layout category more easily.

 

There is actually another problem with the script, but I feel bad for asking for too much help and I'm not too fussed with this. It has a problem with plural and singular in the search feature. If you type "scissors", the scissors layout doesn't show up and only does if you search "scissor". The person who wrote this said he would fix this but he ignored my last email so that's why I am asking for help from you guys.

 

The script doesn't use a database, it just creates each layout and the catagories when I make a new folder and upload certain files to it.

 

As it isn't a free script I don't think it would be a good idea if I posted any of the code publicly, so if you think you can help me with any of those problems, please could you message me or email me for the bits of code I need altered?

I would be really grateful if someone could help me with this and thanks in advance!

If I'm asking for too much, I'm sorry :(

Link to comment
Share on other sites

It might be ok to post little bits of it, it's not like I'm posting the whole thing here.

 

This is the section which creates the category links:

//////Build Catergories//////
$cats = array();

if ($handle = opendir($path."cat/")) {

    while (false !== ($file = readdir($handle))) {
if(($file != ".")&&($file != "..")&&($file != "_thumbs")&&($file != "./")){
	array_push($cats, $file);
	}
    	}

    closedir($handle);
}
////End Build Catergories////

/////Build Nav/////
$cat_count=1;

foreach($cats as $cat){
$cat_strip = trim(preg_replace('/[^a-zA-Z]/', ' ', $cat));
echo "  <a href=\"".$site_url."index.php?id=".$cat."\" class=\"squarenav\">".ucfirst($cat_strip)."</a>  \n";
if ($cat_count % $cats_per_row == 0) { echo "<br /><br />";}
$cat_count++;
}
/////End Build/////

 

I would like them to display alphabetically and I read in my PHP book to use the sort() function, but I have no idea where to put it.

 

This is the bit which displays the layouts:

$done_layout = file($path."data/cache/".$selected."_done_".$layout.".txt");
$done_layout = implode("", $done_layout);

$bg_layout = file($path."data/cache/".$selected."_bg_".$layout.".txt");
$bg_layout = implode("", $bg_layout);


echo "<table><tr>";

if ($items_per_count % $show_ad == 0) { 
echo "<tr><td> </td><td>";
include("ad.php");
echo "</td></tr>";
}

echo"<td><a href=\"".$site_url."preview.php?cat=".$selected."&layout=".$layout."\" title=\"".$layout_strip." layout\" target=\"_blank\"><img src=\"".$site_url."blank.gif\" style=\"background-image:url(".$thumb.");background-repeat:no-repeat;\" alt =\"".$alt."\" border=\"0\" height=\"".$thumb_h."\" width=\"".$thumb_w."\" /></a>\n";
echo "<td><p id=\"ltitle\">".ucfirst($layout_strip)." for your Myspace Layout:</p>";

echo "<textarea cols=\"".$t_cols."\" rows=\"".$t_rows."\" onclick=\"this.focus(); this.select();\">\n";

echo htmlspecialchars($done_layout);

echo htmlspecialchars("<a href=\"".$site_url."\">myspace layouts</a>")."</textarea><br /><p id=\"ltitle\">".ucfirst($layout_strip)." Background:</p><textarea cols=\"".$t_cols."\" rows=\"".$t_rows."\" onclick=\"this.focus(); this.select();\">\n";

echo htmlspecialchars($bg_layout);

echo htmlspecialchars("<a href=\"".$site_url."\">layouts</a>")."</textarea></td></tr></table><br /><hr>\n";

                	}
	}
closedir($dir_layouts_css);
                           }
}

So with that bit, I don't want any textareas as they will be moved onto a separate page, and for the layouts to be displayed in a table with three layouts in a row (like in the screenshot).

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.