Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Old 09-13-2008, 01:24 PM PHP for CMS
Junior Talker

Posts: 1
Trades: 0
Hi Guys!

I'm aware of CMS as Joomla!, CMS Made Simple etc.
This is not what I'm looking for.
What I'm trying to find is something for this:

Let's say there is a webpage like this:
HTML Code:
<html>

<head>
<title>test</title>
</head>

<body>
<p>text</p>
</body>

</html>
I want something which can make the text between the <p> and </p> tags editable in a browser. I know the CMS like Joomla! use templates and a database but this is way to extensive. I just want an authorised visitor to be able to edit the text and Joomla! can do this but it is to much for just this simple task.

Is there something for this in PHP or another scripting language?

Thanks in advance!
Robin1212 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 09-13-2008, 01:37 PM Re: PHP for CMS
wayfarer07's Avatar
Poo on You

Latest Blog Post:
Introducing WowWindow
Posts: 3,987
Name: Abel Mohler
Location: Asheville, North Carolina USA
Trades: 0
It's not as simple as you think. It takes some knowledge to accomplish. Do you have a specific question?
__________________
I build web things. I work for the startup
Please login or register to view this content. Registration is FREE
.
wayfarer07 is offline
Reply With Quote
View Public Profile Visit wayfarer07's homepage!
 
Old 09-13-2008, 09:20 PM Re: PHP for CMS
thehuskybear's Avatar
Ultra Talker

Posts: 362
Name: Sam
Location: Tucson, AZ
Trades: 1
Well, the best way would probably be using AJAX and php... but as wayfarer said, it is no simple process. What is your skill level with php? Here are some links that might get things rolling for you:

W3Schools Ajax Tutorial

jQuery (make AJAX a ton easier... trust me, I learned the hard way!)

Making a Ajax CMS

TinyMCE (WYSIWYG Javascript Editor - what I use in all of my CMSs)

I build a custom CMS for all of my clients. Its really not a hard thing to do.. but you have to know how to work with php / MySQL and Javascript.. at least have a basic understanding.
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE
thehuskybear is offline
Reply With Quote
View Public Profile Visit thehuskybear's homepage!
 
Old 09-13-2008, 09:21 PM Re: PHP for CMS
Novice Talker

Posts: 7
Name: César
Location: MAYCHU.NET
Trades: 0
Try to see some demo at www.opensourcecms.com
lovelycesar is offline
Reply With Quote
View Public Profile Visit lovelycesar's homepage!
 
Old 09-14-2008, 05:34 AM Re: PHP for CMS
Junior Talker

Posts: 4
Trades: 0
I wouldn't recommend messing with Ajax if he doesn't have some basic PHP knowledge. And yes, the task can be accomplished in PHP. No need for Ajax mumbo-jumbo if you are a beginner.
__________________
PHP Noob -
Please login or register to view this content. Registration is FREE
vasago is offline
Reply With Quote
View Public Profile
 
Old 09-14-2008, 07:12 AM Re: PHP for CMS
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,385
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Guys

It's only a simple templating scheme and it's as simple as:
Code:
<html>

<head>
<title>test</title>
</head>

<body>
<p>[placeholder]</p>
</body>

</html>
and let the users edit the [placeholder] value.


NOW Exactly HOW you allow the editing is the complicated bit!
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 09-14-2008, 09:03 AM Re: PHP for CMS
thehuskybear's Avatar
Ultra Talker

Posts: 362
Name: Sam
Location: Tucson, AZ
Trades: 1
Quote:
Originally Posted by vasago View Post
I wouldn't recommend messing with Ajax if he doesn't have some basic PHP knowledge. And yes, the task can be accomplished in PHP. No need for Ajax mumbo-jumbo if you are a beginner.
That is true.. AJAX isn't a necessity.
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE
thehuskybear is offline
Reply With Quote
View Public Profile Visit thehuskybear's homepage!
 
Old 09-14-2008, 03:00 PM Re: PHP for CMS
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,385
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
AJAX makes it much easier.

Three files needed
index.php c/w AJAX code
PHP Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>

<head>
<title>test</title>
<script type="text/javascript">
function remoteCall(p_sValue) {
var xml;
var xmlQuery = "";
        try {
          xml=new XMLHttpRequest();
          } catch (e) {
          try {
            xml=new ActiveXObject("Msxml2.XMLHTTP");
            } catch (e) {
            try {
              xml=new ActiveXObject("Microsoft.XMLHTTP");
              } catch (e) {
              alert("Your browser does not support AJAX!");
              return false;
              }
            }
          }
    xml.onreadystatechange=function() {
        if (xml.readyState==4) {
        window.location.reload();
        }
    
    }
xmlQuery =  "edit.php?txt=" + encodeURI(p_sValue) ;
//    setMessage(xmlQuery)
    xml.open("POST",xmlQuery ,true);
    xml.send(null);
}

function edit() {
    var txtValue = prompt("Enter text to show","New Text");
    remoteCall(txtValue);
}
</script>

</head>

<body>
<p onclick="edit()"><? include("text.php")?> </p>
</body>

</html>
text.php
Code:
Click here to edit
chmod 777 on this file!

edit.php
PHP Code:
<?
$newText 
$_GET['txt'];


$incFile "text.php";

$fileH fopen($incFile'w') or die("can't open file");
fwrite($fileH$newText);
fclose($fileH);

?>
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Reply     « Reply to PHP for CMS
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

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





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 1.01494 seconds with 12 queries