LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Any good PHP programmers here? (https://www.linuxquestions.org/questions/programming-9/any-good-php-programmers-here-552720/)

Jorophose 05-09-2007 06:23 PM

Any good PHP programmers here?
 
(I want to know if this is possible in PHP. If you know it won't work, PLEASE suggest another language. If it will, let me know what I should read up on, give me examples, etc. so I can learn.)

How can I make a page editable in the browser with PHP?

What about discussion pages? Not ala wikipedia, nor a full-blown forum, rather something like what Desktop Linux uses. (http://desktoplinux.com/cgi-bin/boar...oard=talkbacks) I'd love to avoid JavaScript, and possibly databases too in the process.

(Just not something I'd like to deal with.)

What I'm interested in doing is building a system like MediaWiki, except... more static pages. Less reliance on databse. Much more of a mobile operation; I want to lower the amount of reliance on databases and javascript as possible; I'm look for much more server-side, and much less client-side.

IMHO, the wiki is great, but it's got a horrible interface.

Oh, and why I didn't take the mediawiki system and change the stylesheets and modify other stuff like that? I want to get rid of wiki-formatting too. I want to go for an HTML/XHTML or XML-based site instead. (If PHP can work with XML. Haven't read up on it)

Also, I need help organising the actual content. Do you think I should go via categories, via letters/numbers, or just dump them all in one (HUGE) directory? What I'm planning to make it look like is:

me.moo/index.php[/url]

But then for content, either:
me.moo/s/a.php?=Archeology
(If PHP handles pages like that)
or
me.moo/s/news.php?=09_05_07
me.moo/s/warhammer.php?=Dark_Elves
or
me.moo/van.php?=Something_Here_Or_Whatnot

(The "s" represents "static". There will also be "d", "developper". I'll possibly make it like d.me.moo or whatever.)

The idea behind the interface is that all pages are static. No javascript if possible, and PHP does everything server-side only. Where it gets interesting is that there will be a discussion system, where additions can be discuessed, and there will be a nightly-build section; at midnight (or as late as possible), the static pages are archived, and the well-worked nightly-build pages (Any one that had good content added) will either replace, or simply help re-build, the static pages. Oh, and you don't need to register to add anything to the nightly builds, which won't be as highly-moderated (In theory) because it's more of a draft than real information. The discussion board might need registration, and the static page editing will definately require registering, and most likely moderator-level powers.

(In the case of no static page available, the user is prompted to either go to the nightly-build, to either start it or view it, or look for something else.)

It's supposed to help the creadibility of wikis. Generally people don't trust wikis because of the fact that anyone can edit them, and then there's some wikis that just hate you and force you to register before editing things. I'm hoping this system can prove to be credible while still keeping an open-mind. The only thing I'm afraid of is people making edits in the nightly-build section, but having them removed by spammers. I guess the best thing to do would be keep a (sadly, long) log of who posted what somewhere on the server.

Thanks to anyone who's crazy enough to read all of this and help me out.

PS: Sorry if this post reads badly, I wrote it kind of as I went along, so you know not much structure.

PPS: All programmers are good ones except for me :P

buggabill 05-09-2007 09:32 PM

I may be wrong here, but this sure sounds like a situation for a content management system.

Check out http://www.joomla.org/

chrisranjana.com 05-10-2007 05:16 AM

cms systems
 
If you could take a tour of all features present in Drupal or Joomla or wiki or even wordpress and then if you can post the things that you would like done in addition to the already existing features I guess more help will be forthcoming

For e.g you can pass protect wiki pages so that no everyone can edit them etc

Jorophose 05-10-2007 03:17 PM

Thanks for the Joomla link... But I think I'm just going to mix+match the parts that I want.

One critical thing though: How do I get the "something.php?=Something" effect that I see sometimes? And can it cross directories? (IE: "something" could be at /blag/soft/something)

Alien_Hominid 05-10-2007 05:45 PM

Isn't it http://httpd.apache.org/docs/2.2/rew...ite_guide.html thing?


And what's the difference between your system and the wiki? Each edit creates new html file? As I understand, you need a online WYSIWYG editor, which is done with javascript. PHP is only preprocessor, it can't interact with the user directly.

Jorophose 05-10-2007 06:31 PM

There's some other stuff I wanted to try and build; notably the discussion forum thingie. I don't like the way wikis handle it; IIRC, they all use the Talk pages, which are just like regular pages, except they hold little content. And I also wanted to figure out the whole navigating-with-php system.

I'm pretty sure though I wouldn't need Javascript for uploads and messaging and stuff; I've seen uploading via CGI, and I'm sure it's not overly difficult to strip as much JS possible out of the pages for the editing process.

Of course, the real reason I won't go with a wiki is the wiki syntax. It drives me nuts. I just want people to use XHTML directly, or a custom XML. I don't want something that I don't enjoy using.

jiml8 05-15-2007 06:58 PM

With PHP it is no trouble to just load up an existing html page on the server, and ship it to the user in an html textarea. If you do a proper job of separating your content from your structure, the only html the user sees will be the content. I don't see why you wouldn't want to put that content in a database and just pick it from there, but there is no law that says you have to.

Just fopen the html file, read it in as a string, and ship it to the user. No biggie. User changes it, ships it back, you save it off.

Of course, you'll need to be careful because a php script configured to do this could in principle fopen any file and ship the information. This would be a really bad security problem.


All times are GMT -5. The time now is 01:46 AM.