#1
|
||||
|
||||
How can I do these things?
Okay, I hope nobody minds the bulk post, but I'm struggling a little, and the more I stare at the php, the more confusing it looks... xD
First off, how can I edit how the myadopts page is arranged? I REALLY love the way it's displayed now, but I was wondering of adding some stuff. How can I do this? I wanted to make it look something like this; Gender Name/Breed Picture Level/Current Clicks/Clicks until Next Level Trade Status/Frozen Status? Feed Link (since nobody likes going through the middle step) Can someone point out where I need to edit this? Second, I'm not sure if this is a glitch or not, but the pound is only showing one rat at a time? I know there is multiple rats owned by the system since I abandoned them with the sole purpose of testing it, and for some reason, only one is showing up. The first one to be abandoned is there, and then once it's adopted, the next one shows up. Can I change this so the users can view all of the pets in the pound? Third; table bbc - I know I could probably go through the cpanel, but I like editing through the site, less tabs open. I wanted to do a table on the news page, since that's how I was displaying it on my MA site and I liked that way. I know it's simple to add bbc, I did this with a small script someone had for adopts, but I'm not sure how to make it. EDIT: Fourth - I am having trouble when I do things like Rat's or something. It turns out Rat\'s. This is happening everywhere, can I stop it, or do I have to go back and edit everything? (don't think I can, I did some in the descriptions of rats...) EDIT AGAIN: Gah, sorry, but I forgot one more thing - how do I remove a skin? I don't want to have the element one, and it doesn't appear to be working as a default one. I'm sorry for all the questions, I've never done this before! Last edited by AlexC; 03-18-2011 at 04:13 PM. |
#2
|
|||
|
|||
-- First
PHP Code:
-- Second It shouldn't do that. Maybe you've edited the code before. Post it here, I'll take a look and see what's wrong. -- Third I'm not sure about this one, but please do try it. Put it inside the inc/bbcode.php PHP Code:
The backslash is to escape the character to prevent SQL injection -- Last? You have to edit the database manually and then remove the theme folder from the templates folder. For the database, you'll have to delete the corresponding row to the theme in adopts_themes table. |
#3
|
||||
|
||||
Thanks very much for posting! I do not have access to my computer for the weekend, so I shall test this all on Monday - thanks so much though!
~ ipod |
#4
|
||||
|
||||
Thank you for the myadopts page edit, I edited the page to my liking and it works wonderfully!
Here is my pound page. Code:
<?php include("inc/functions.php"); //***************// // START SCRIPT // //***************// $id = $_GET["id"]; $aid = $_GET["aid"]; $type = $_GET["type"]; $name = $_GET["name"]; $currentlevel = $_GET["currentlevel"]; // Here we check if we have an ID that has been submitted or no if($aid == "" or !is_numeric($id)) { // We did not enter in an id, or it is not a number $article_title = $poundtitle; $article_content = $poundcontent; // If we are a guest, show a message that lets them know that they cannot adopt... if($isloggedin != "yes"){ $article_content = $article_content.$poundguestcontent; } // Begin the output of all the adoptables to the user... $query = "SELECT * FROM ".$prefix."owned_adoptables WHERE owner='SYSTEM'"; $result = runquery($query); $article_content .= "<form name='form1' method='get' action='poundpost.php'> <h3>The Rat Rescue</h3><table>"; while($row = mysql_fetch_array($result)) { $aid=$row['aid']; $type=$row['type']; $name=$row['name']; $currentlevel=$row['currentlevel']; $gender=$row['gender']; $adoptimage=getcurrentimage($aid); $query = "SELECT * FROM ".$prefix."adoptables WHERE type='$type'"; $result = runquery($query); $num = @mysql_numrows($result); $i=0; while ($i < 1) { $cost=@mysql_result($result,$i,"cost"); //The cost of adoption $i++; } $totalcost = $cost * $currentlevel; // Call a function to check if we have the proper privledge level to adopt this pet $article_content .= "<tr> <td><input type='radio' name='aid' id='aid' value='{$aid}' /></td> <td style='text-align: center'><img src='".$adoptimage."' /></td> <td><strong>{$name}</strong> <br> Cost: $totalcost <td>level: $currentlevel <br> Gender: <img src='picuploads/{$gender}.png'> </td></tr>"; } // End the looping out of all adoptables... $article_content .= "</table> <h3>Care to adopt an abandoned rat?</h3> <p> <input name='aid' type='hidden' id='aid' value='".$aid."'/> <input name='type' type='hidden' id='type' value='".$type."'/> <input name='name' type='hidden' id='name' value='".$name."'/> <input name='currentlevel' type='hidden' id='currentlevel' value='".$currentlevel."'> </p> <p> <input type='submit' name='Submit' value='Adopt Me'> </p> </form>"; } // This bracket ends the IF check for whether or not an ID was entered else{ // We have specified an ID of an adoptable we wish to adopt $query = "SELECT * FROM ".$prefix."owned_adoptables WHERE aid='$aid' LIMIT 1"; $result = runquery($query); $row = mysql_fetch_array($result); $id=$row['aid']; $type=$row['type']; $name=$row['name']; $currentlevel=$row['currentlevel']; $gender=$row['gender']; $adoptimage=getcurrentimage($aid); if($aid == $id){ //The adoptable exists and is valid if($canadopt == "yes"){ $article_title = "Adopting abandoned rat named ".$name; $article_content = $langa1."".$name.$langa2; $article_content = $article_content."<br><img src='".$adoptimage."' border='0'><br> <form name='form1' method='get' action='poundpost.php'> <p> <input name='aid' type='hidden' id='aid' value='".$aid."'> <input name='type' type='hidden' id='type' value='".$type."'> <input name='name' type='hidden' id='name' value='".$name."'> <input name='currentlevel' type='hidden' id='currentlevel' value='".$currentlevel."'> </p> <p> <input type='submit' name='Submit' value='Adopt Me'> </p> </form>"; } else{ $article_title = $accden; $article_content = $adoptnoper; } // End Can Adopt ELSE } else { //The adoptable does not exist, nothing we can do... $article_title = $err_idnoexist; $article_content = $err_idnoexist_text; } // End adoptable does not exist ELSE } // This bracket ends the else statements for whether or not an ID was entered //***************// // OUTPUT PAGE // //***************// echo showpage($article_title, $article_content, $date); ?> I tried the table and it worked wonderfully! I tried removing the theme, it worked fine, but once I logged out, I got this message! Warning: file_get_contents(templates/elements/template.html) [function.file-get-contents]: failed to open stream: No such file or directory in /home/gloometh/public_html/inc/functions.php on line 819 I think this is because it kept thinking elements was the default theme - can I set it to simple through my file manager? |
#5
|
||||
|
||||
I think your have to go in to the batabase and edit it or at least that's what I had to do.
|
#6
|
||||
|
||||
which database area? I'm not good with phpadmin. D:
|
#7
|
||||
|
||||
_settings
|
#8
|
||||
|
||||
thank you very much, that fixed it! :D
Now I just need to figure out the pound page... |
#9
|
|||
|
|||
I have no idea about the pound page but:
Quote:
What you do is put this code in: Code:
$article_content = stripslashes($article_content); Code:
$article_content = bbconvert($article_content); // BBCODE conversion $article_content = nl2br($article_content); // New line breaks
__________________
Regards, ...the CSS lovin' cookie monster... ~C.Maestro ___________________ I'd like to think I'm good at CSS&HTML, so if you need help with designing templates and stuff, feel free to 'come at me bro' with the questions. Haha, also if you need help with installing the Mysidia Adoptables Script, please check out my guide here! |
#10
|
||||
|
||||
alright, I shall try that.
It worked everywhere, as far as I can tell. ^.^ However, it's still showing up in the descriptions? Stuff like "It\'s got a cute little black hood and cape, and it won\'t stop bouncing around either. How odd. Full name is Black Hooded Rat.". But the page is working fine? |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Need Help With a Few Things | parayna | Questions and Supports | 3 | 09-28-2015 06:51 AM |
Just 2 more things | Starrunner | Questions and Supports | 17 | 01-12-2014 07:31 PM |
A few more little things... | Ruinily | Questions and Supports | 0 | 07-03-2013 08:16 PM |
few things help | 12345 | Questions and Supports | 1 | 05-05-2009 04:23 PM |
Few things | 12345 | Questions and Supports | 1 | 04-21-2009 03:42 PM |
What's New? |
What's Hot? |
What's Popular? |