
AshleyByrom
Members-
Posts
51 -
Joined
-
Last visited
Everything posted by AshleyByrom
-
Okay I don't think my organisation of this was the best way to do it but here is my problem. I have a MySQL table which lists of load of 'pages'. (My website is CMS based and each row is a page.) I have two types of pages. Main or Child. Child pages have a Parent (which is one of the main pages). You can probably see how this is going. I have a navigation that lists all the 'main' pages and when you mouseover it you see a dropdown of sub-pages (all the child pages for that parent page) I would like to create some sort of tool in the CMS Cp that allows the admin to drag and drop the pages so they are displayed in a certain order. I've tried ordering them by ID but it gets too confusing when switching orders and switching IDs. Hopefully you will understand this and somebody has had this problem before? - Thanks in advance!
-
AlexWD Thanks, I thought I did? I'll have to check... EDIT: Yes, I have...
-
AlexWD Thank you so much!!! However, your script doesn't work completely because a fatal error is returned. Fatal error: 'http://thewalkingtree.files.wordpress.com/2009/07/children-1.jpg' is not a valid image resource on line 11 [/home/www/byrom.freehostia.com/smclc/image.php] line 11 is: $image = new Image('http://thewalkingtree.files.wordpress.com/2009/07/children-1.jpg');
-
Thanks, I've had a bit of a brainwave... all the scripts to similar things to what I want but I can't seem to find one myself, looks like I'm going to have to hard code it... Thanks anyway !
-
Hey! Well I have a little dilema, hoping I could find some guidance. I have a CMS and on the actual website I am building I have a nice little slideshow script that runs through all the images in a certain directory. The dimensions of the slideshow are 900x250. (Obviously not all images come in this size straight from the camera so I need a little resize crop and save script to do this for the user) I would like the 'admin' to be able to upload an image (or more than one at the same time, if it's not much more hard work) and then PHP simply takes over from there. At which point the images would be resized to 900px in width (keeping the aspect ratio) and then cropped to take the middle 250px out. then this image is saved in "images/slideshow" as a 900x250 pixel image? The format it is saved in isn't that much of a problem. Thanks a lot in advance! Any guidance is appreciated! For example, this image: http://thewalkingtree.files.wordpress.com/2009/07/children-1.jpg Would become: http://img503.imageshack.us/img503/4315/kidsl.png
-
Okay well I am trying to make a 'dynamic' calender image with PHP. I have images like this: and: Obv I have an image for each day of the month (1 - 31) and I have images for each month. if i created a file named, cal.php i want to be able to use that in an img tag and it will mix two images together (month with day below it) and will show today's date. Any guidance, links to tutorials etc? Thanks in advance!!
-
[SOLVED] Run PHP from MySQL Database - eval?
AshleyByrom replied to AshleyByrom's topic in PHP Coding Help
Thanks, and like you said it's only for simple stuff (like the date!) Plus, the only people able to edit the content is the site admins so they can destroy their site if they wish... Thanks alot! -
[SOLVED] Run PHP from MySQL Database - eval?
AshleyByrom replied to AshleyByrom's topic in PHP Coding Help
whaaaaaat an idiot. Thank you so much!! -
Hey, right I wouldn't say I'm a complete beginner but I'm definitely not the best. I am making a website, with a fairly basic CMS. Each page is stored in a row in a table (shown below) id name content 1 Home <b>HELLO</b> there <u>welcome</u> to the site. 2 About us <b>HELLO</b> there <u>welcome</u> to the about bit. hopefully you can understand how the basic principles work, by going to mywebsite.com?id=1 you would see the first 'page'. mywebsite.com?id=2 would give you the second 'page' and so on... Plus, the html stored in the database has all the characters converted as you can see. Using html_entity_decode i convert all these characters back. Right, here is my problem. I want to have some PHP code mixed in with the HTML stored in the database. I have looked at eval but that appears to just handle PHP code, not PHP and HTML? Unless I am mistaken... Here is the actual code I have (including PHP) <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td align="left" valign="top"><table border="0" align="left" cellpadding="10" cellspacing="0" background="images/qouteback.gif" width="260" height="165" style="background-repeat: no-repeat; top: 5px; left:5px;"> <tr> <td width="229" align="left" valign="top"><table width="52" border="0" align="left" cellpadding="0" cellspacing="0"> <tr> <td valign="top" height="5"></td> </tr> <tr> <td valign="top"><div class="newsCal"> <div class="newsCalMonth"> <?php $month = date("M"); $day = date("d"); echo $month; ?> </div> <div class="newsCalDay"><?php echo $day; ?></div> </div></td> </tr> </table> <font size="+1"><u>New Website!</u></font><br /> We'd like to welcome you to the brand new website we have. Hopefully you will find the site easier to use and more informative.<br /> <br /> There have been lots and <strong>lots</strong> of changes so let's hope they were for the best!</td> </tr> </table></td> <td><div style="text-align:justify;"> A City Learning Centre's purpose is to promote and develop new and exciting ways of learning through the use of Information and Communication Technology (ICT). The CLC combines state-of-the-art facilities and expertise to provide learning opportunities to a network of local schools (primary and secondary), the local community and local businesses.<br /> <br /> The model of the City Learning Centre, working in true partnership with local schools, community and business, <strong><blink>[THIS IS WAY TOO MUCH TEXT FOR A INDEX PAGE - JUST A GAP FILLER]</blink></strong>is set to transform urban education. South Manchester CLC will enhance learning by providing courses and opportunities for individual pupils, delivering services and outreach support for a wider network of local schools, including providing extension activities for Gifted and Talented pupils and study support, acting as a test bed for innovation and new ways of teaching and learning and cascading best practice amongst the local network of schools and other facilities.<br /> <br /> There is a huge potential to be derived from collaboration between all sectors of education, sharing a common purpose to develop state-of-the-art technology to transform teaching and learning in schools, colleges, businesses and within the local community.<br /> <br /> There are 4 CLC's based within Manchester including Central, North West, North East and of course South Manchester City Learning Centre with a total of 104 CLC's around the country. </div></td> </tr> </table> Hope you understand and can help! Thanks in advance!