TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 10-25-2007, 08:54 AM   #1 (permalink)
Jmz
The Acquainted
 
Join Date: Oct 2007
Location: Newcastle, UK
Posts: 113
Thanks: 3
Jmz is on a distinguished road
Default Toolbar

I'm having a play around making a simple cms and I was wondering, how do you do the toolbar things (like the one above the text area when making a post for example).

Do people make their own? I've seen some ready made open source ones, are they any good?
Send a message via MSN to Jmz
Jmz is offline  
Reply With Quote
Old 10-25-2007, 11:28 AM   #2 (permalink)
The Acquainted
Upcoming Programmer 
 
CMellor's Avatar
 
Join Date: Sep 2007
Location: Leeds, UK
Posts: 141
Thanks: 6
CMellor is on a distinguished road
Default

Do you mean a WYSIWYG?

I use this: http://tinymce.moxiecode.com/ it's very good.
__________________
Not quite a n00b...
CMellor is offline  
Reply With Quote
Old 10-25-2007, 11:50 AM   #3 (permalink)
Jmz
The Acquainted
 
Join Date: Oct 2007
Location: Newcastle, UK
Posts: 113
Thanks: 3
Jmz is on a distinguished road
Default

Yea, thats what I mean.

Is the one you suggested easy to implement? or is it more advanced?
Send a message via MSN to Jmz
Jmz is offline  
Reply With Quote
Old 10-25-2007, 10:25 PM   #4 (permalink)
The Acquainted
Upcoming Programmer 
 
CMellor's Avatar
 
Join Date: Sep 2007
Location: Leeds, UK
Posts: 141
Thanks: 6
CMellor is on a distinguished road
Default

Really easy to install. Follow the instructions on there website's Wiki page, it will help a lot.
__________________
Not quite a n00b...
CMellor is offline  
Reply With Quote
Old 10-25-2007, 11:36 PM   #5 (permalink)
The Acquainted
 
Join Date: Sep 2007
Location: Arizona
Posts: 114
Thanks: 10
Andrew is on a distinguished road
Default

TinyMCE is definitely the best, and easiest to install. It's the one Wordpress and other scripts use in the backend.
Send a message via AIM to Andrew Send a message via MSN to Andrew
Andrew is offline  
Reply With Quote
Old 10-26-2007, 08:04 AM   #6 (permalink)
Jmz
The Acquainted
 
Join Date: Oct 2007
Location: Newcastle, UK
Posts: 113
Thanks: 3
Jmz is on a distinguished road
Default

I must admit, I'm really pleased with this toolbar, got the whole thing up and working in a few minutes :D

Thanks a lot!
Send a message via MSN to Jmz
Jmz is offline  
Reply With Quote
Old 10-26-2007, 09:12 AM   #7 (permalink)
Jmz
The Acquainted
 
Join Date: Oct 2007
Location: Newcastle, UK
Posts: 113
Thanks: 3
Jmz is on a distinguished road
Default

I've came across a weird bug with this, its been mentioned on their forum but there's not a fix so I thought I'd post here to see if anybody else has came across it.

Basically if you go to: http://jamesowers.co.uk/cms/add.php in ie you will see the content box doesn't work but if you go to: http://www.jamesowers.co.uk/cms/add.php it works fine. Does anybody know what would make this happen? The javascript error is 'access denied'.
Send a message via MSN to Jmz
Jmz is offline  
Reply With Quote
Old 10-26-2007, 10:15 AM   #8 (permalink)
Super Moderator
Advanced Programmer 
 
bluesaga's Avatar
 
Join Date: Sep 2007
Posts: 165
Thanks: 0
bluesaga is on a distinguished road
Default

Probably slack coders on there front, if its a known bug and they haven't fixed it there probably isn't much support for it.

Is this the one wordpress uses?
bluesaga is offline  
Reply With Quote
Old 10-26-2007, 12:01 PM   #9 (permalink)
Jmz
The Acquainted
 
Join Date: Oct 2007
Location: Newcastle, UK
Posts: 113
Thanks: 3
Jmz is on a distinguished road
Default

Yes I think it is.


Is there a way (using php or something) I can check if the url has the www in and if it doesnt then redirect them to a page that does?
Send a message via MSN to Jmz
Jmz is offline  
Reply With Quote
Old 10-26-2007, 01:50 PM   #10 (permalink)
La Vida es Sueño
Advanced Programmer Top Contributor 
 
Wildhoney's Avatar
 
Join Date: Sep 2007
Location: Oldham
Posts: 2,280
Thanks: 90
Wildhoney is on a distinguished road
Default

In .htaccess you can:

Code:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^jamesowers.co.uk
RewriteRule (.*) http://www.jamesowers.co.uk/$1 [R=301,L]
__________________
The man who comes back through the Door in the Wall will never be quite the same as the man who went out.
Send a message via AIM to Wildhoney Send a message via MSN to Wildhoney Send a message via Yahoo to Wildhoney
Wildhoney is offline  
Reply With Quote
Old 10-26-2007, 02:44 PM   #11 (permalink)
Super Moderator
Advanced Programmer 
 
bluesaga's Avatar
 
Join Date: Sep 2007
Posts: 165
Thanks: 0
bluesaga is on a distinguished road
Default

Also possible in PHP:

PHP Code:
if(substr($_SERVER['SERVER_NAME'], 03) != 'www')
      
redirect301('http://www.' $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI']);

function 
redirect301($szLoc
{    
      
header('HTTP/1.1 301 Moved Permanently');
      
header('Location: ' $szLoc);
      exit;

This will redirect any url that doesn't have www at the very beginning to www version of the url
bluesaga is offline  
Reply With Quote
Old 10-26-2007, 03:18 PM   #12 (permalink)
Jmz
The Acquainted
 
Join Date: Oct 2007
Location: Newcastle, UK
Posts: 113
Thanks: 3
Jmz is on a distinguished road
Default

Quote:
Originally Posted by bluesaga View Post
Also possible in PHP:

PHP Code:
if(substr($_SERVER['SERVER_NAME'], 03) != 'www')
      
redirect301('http://www.' $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI']);

function 
redirect301($szLoc
{    
      
header('HTTP/1.1 301 Moved Permanently');
      
header('Location: ' $szLoc);
      exit;

This will redirect any url that doesn't have www at the very beginning to www version of the url
Doesnt seem to be working :confused:

http://jamesowers.co.uk/cms/add.php
Send a message via MSN to Jmz
Jmz is offline  
Reply With Quote
Old 10-26-2007, 10:19 PM   #13 (permalink)
The Acquainted
 
Join Date: Sep 2007
Location: Arizona
Posts: 114
Thanks: 10
Andrew is on a distinguished road
Default

I'd use the .htaccess one for the main reason is that you need to put that PHP code in every file that you want to switch to www. The code Wildhoney works on all pages on a site.
Send a message via AIM to Andrew Send a message via MSN to Andrew
Andrew is offline  
Reply With Quote
Old 10-26-2007, 10:22 PM   #14 (permalink)
Super Moderator
Advanced Programmer 
 
bluesaga's Avatar
 
Join Date: Sep 2007
Posts: 165
Thanks: 0
bluesaga is on a distinguished road
Default

I would do what Andrew suggests also, however if you have added the code to the start of "add.php" then it should be fine....

You need to ensure there is no whitespace in the output html before the code also, as this will cause it not to redirect properly.
__________________
Halo 3 Cheats
bluesaga is offline  
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 03:41 AM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design