Topic: When calling a Mysql DB field that is empty display a image (Read 2745 times)
I love Pokemon
Gender:
Posts: 14
102 credits Members referred : 0
« on: Oct 29, 2008, 03:13:33 pm »
Hiya Just got a little daft problem and my brain has went a bit dead {totaly)
I am creating a simple content management syistem that can be managed and edited directly from the admins pc without having to use the pages online admin pages on the remote server using MS access or open office however i did run into a few minor probs with open office
To get round the oppen office probs I am creating some scripts so that I can manage my remote website from my local server, All apears to be working just about ok
The test site can be found here its a simple image gallery based on the script but can easly adapted for classifides, blog etc that can be remotaly managed
http://juraphotos.photofxr.co.uk/gallery/ ______________________________________________________ If their is no image name stored in the DB table I would like to display a small logo
The image name is stored in the database and is called to the page with $query_rs_page_template = "SELECT * FROM webpages WHERE number = '$page_id'";
A simple if and else statement but as they say I carnt see the wood for the trees lol any sergestions would be most apreciated ___________________________________________ The script is to be opensource [b][/b] To do docs and clean up the junk I shall upload the full script later tonight or tomorow to my server with a few notes Many thanks Juraphotos
I am a metal monkey!
Administrator Community Supporter?
Jedai Sword Master
Gender:
Posts: 5799
46391 credits Members referred : 3
« Reply #1 on: Oct 29, 2008, 03:17:08 pm »
I am not sure if this is what you ask but I will give it a try
Global Moderator Community Supporter?
Jedai Sword Master
Gender:
Posts: 6691
34714 credits Members referred : 374
It's time to use PHP5!
« Reply #4 on: Oct 29, 2008, 07:32:29 pm »
or a missing / bad image
I love Pokemon
Gender:
Posts: 14
102 credits Members referred : 0
« Reply #5 on: Oct 29, 2008, 10:58:11 pm »
Thanks for the help I have just being looking on php.net at the
if (file_exists( ))
should do the job fine, I should have thought of that must have being looking at code to long and brain got waterloged thanks
Also out of intrest which WYSIWYG editor you use on this forum I am at pressent using the fckeditor on the remote admin server and the portable remote admin server on the usb stik
I was wondering if you had any recomendations for a WYSIWYG editor that did not use much resorces The fckeditor is very good but can be a little slow to load
Many thanks Juraphotos Much apreciated
I am a metal monkey!
Administrator Community Supporter?
Jedai Sword Master
Gender:
Posts: 5799
46391 credits Members referred : 3
« Reply #6 on: Oct 29, 2008, 11:16:23 pm »
fckeditor is just fine. Here we are not using a WYSIWYG editor. Forum editors use BBcode not native html so it wont help you anyway
Global Moderator Community Supporter?
Jedai Sword Master
Gender:
Posts: 6691
34714 credits Members referred : 374
It's time to use PHP5!
« Reply #7 on: Oct 30, 2008, 06:44:58 am »
forget fuckeditor and use tinymce, all bigger CMS systems using tinymce. fckeditor creates terrible html code
I love Pokemon
Gender:
Posts: 14
102 credits Members referred : 0
« Reply #8 on: Oct 31, 2008, 12:35:19 pm »
Thanks for the advice Lastnight I setup tinymce all is working fine The fck editor worked fine just slow but will take your advice on the messy code also i noticed tinymce was nice and easy intergrate into the pages
I am going to have a look at the tinymce php compressor to see if it can speed up loading The final scripts are almost done just have to check things through, and tidyup the code and get rid of the junk
Many Thanks much apreciated
Juraphotos
Global Moderator Community Supporter?
Jedai Sword Master
Gender:
Posts: 6691
34714 credits Members referred : 374
I love Pokemon
Gender:
Posts: 14
102 credits Members referred : 0
« Reply #10 on: Nov 06, 2008, 02:33:45 am »
Thanks for the link to the tutorial tinymce was easy to setup without any problems nice and easy I have also intergrated ibrowser and imanager The link to the download page for ibrowser and imanager is
it might be usefull to other users as they are a free alternative to tinymce,s MCFileManager and MCImageManager
The cms is coming along fine I am adding some security to the admin pages,
though the cms syistem is intended to be managed remotly using Ms access or using the scripts i have made that run from a server running on a local pc or the portable server on the usb stik
I thought id better add this incase any users of the script have problems conecting directly to their remote mysql database from their pc and have to edit their site via their web browser
Also have to do some basic template examples, documents and setup instructions Many thanks for your help and i will keep you updated
Juraphotos
Novice Spammer
Posts: 101
606 credits Members referred : 0