Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 13
  1. #1
    Member
    Join Date
    May 2003
    Location
    Scotland
    Posts
    39
    Member #
    1316
    Hi,
    I am currently learning php and sql, i am trying to create a article addon for a forum, so forum members can submit articles to a database.

    What i want to do is create a page where the author or thread creator can edit the article they've submitted.

    I want it to be like this forum when you click the EDIT button the original post is shown inside the form.

    Just wondering how this is done?

    Thanks,
    Craig

  2.  

  3. #2
    Senior Member james's Avatar
    Join Date
    May 2003
    Location
    Melbourne, AUSTRALIA
    Posts
    364
    Member #
    1352
    I've just installed phpBB on my local server for mucking around and learning. Is this the forum engine you use? (BTW, We don't talk about VBulletine here for security reasons.)

    There is a field in the table phpbb_forums called 'auth_reply', which appears to be unused, and is set to 0 by default. Perhaps if you set this to 1 in your articles forum, then:

    a) In your viewtopic.php file, where the PostReply button is to be inserted, write some code to check which forum the current topic is part of, and whether auth_reply is set to 0. If it isn't, don't insert the button.
    b) In the posting.php file, do a similar thing--check if the forum has auth_reply set to 0, if not, display an error. (That's mainly to stop determined hackers).
    c) [OPTIONAL] You might also want to change the administration scripts so that the webmaster can change the value of auth_reply from there, ie, an option
    (o) Allow Replies.

    Then you would have a genuine mod on your hands.
    James H
    Home Page · Mars Page · www.fihsf1.net (formerly www·fihs·net)

  4. #3
    Senior Member james's Avatar
    Join Date
    May 2003
    Location
    Melbourne, AUSTRALIA
    Posts
    364
    Member #
    1352
    The other option is to have the users post their articles to the webmaster, then you post it in a locked forum. Did you want the articles to have full HTML, or just vB or bbcode?
    James H
    Home Page · Mars Page · www.fihsf1.net (formerly www·fihs·net)

  5. #4
    Member
    Join Date
    May 2003
    Location
    Scotland
    Posts
    39
    Member #
    1316
    I'm creating it for Burning Board, www.woltlab.de

    I've got it working so only registered members can view and post articles. I've also got it so HTML is stripped from what they type in. I would like to have used bbcode, but it seems pretty complicated for me to get it working. I'm just a newbie!

    When the users are editing an article, (these are not stored in the forum tables already created in the database! They just use the username/passwords, graphics etc of the forum. They have a table in the database of their own) i want it to display what they've already input. Have a look at the image i've attached as it shows it better.

    Thanks, Craig
    Attached Images Attached Images

  6. #5
    Member Black Vivi's Avatar
    Join Date
    Apr 2003
    Location
    UK
    Posts
    75
    Member #
    1072
    Craigr, u got AIM or MSN
    i think i might be able to help, im not gonna talk about it here cos wBB2 costs, so you're not allowed to reveal any of the code to non-buers, which is what i wud be doing
    Download Firebird now!

  7. #6
    Senior Member james's Avatar
    Join Date
    May 2003
    Location
    Melbourne, AUSTRALIA
    Posts
    364
    Member #
    1352
    I'm trying to get v1.2 of WBB to work, just for kicks...
    James H
    Home Page · Mars Page · www.fihsf1.net (formerly www·fihs·net)

  8. #7
    Senior Member james's Avatar
    Join Date
    May 2003
    Location
    Melbourne, AUSTRALIA
    Posts
    364
    Member #
    1352
    I checked it out, and you could do it:

    • Create a group called 'Article Posters'
    • Create a forum, where only 'Article Posters' can create new topics, '#ALL USERS#' can read, and only Admin can reply.
    • When a user wants to put up their article, temporarily change their group to 'Article Posters'. They may be temporarily unable to use some other forums, but only if it's permissions aren't set to '#ALL USERS#'. Then they put up their article, and you restore them to their old group.


    This won't grab the articles from the separate DB you mentioned, but it's the simplest solution.
    James H
    Home Page · Mars Page · www.fihsf1.net (formerly www·fihs·net)

  9. #8
    Senior Member james's Avatar
    Join Date
    May 2003
    Location
    Melbourne, AUSTRALIA
    Posts
    364
    Member #
    1352
    The cool thing about WBB is that all bbCode is in a DB table, so I added custom codes for HTML tables. Otherwise it seems to be a mix of phpBB and VBulletin.
    James H
    Home Page · Mars Page · www.fihsf1.net (formerly www·fihs·net)

  10. #9
    Member
    Join Date
    May 2003
    Location
    Scotland
    Posts
    39
    Member #
    1316
    Sorry, I have got the script written that posts articles to the database, extracts them all too. Displays them all neatly, etc.. I also know how to set permissions. Everyone can view the list of articles, but only registered members will be able to post new ones.

    What i'm looking for is help for creating an edit page, where the user can edit the article they've already submitted.

    I know how to show the user what they've submitted i, but i want the information they submitted to be in the form box, so they can edit it. Like on the various forum software! Hit edit post here and the information you've already posted is shown in the form and you can edit it easily.

    Thanks
    Craig

  11. #10
    Senior Member james's Avatar
    Join Date
    May 2003
    Location
    Melbourne, AUSTRALIA
    Posts
    364
    Member #
    1352
    What format are the articles in? Just text with bbCode (or something equivalent)?
    How many fields go into these articles? Just 'title' and 'body' and 'username'?
    Is the list of articles displayed with a separate php file? You must have at least modified main.php to have a link to something that does the job of board.php, which in turn calls a new thread.php...
    Or do you do something like reading the articles_db periodically, and create entries in the bb_threads table?

    If those questions make any sense, it means I'm on the right track...
    James H
    Home Page · Mars Page · www.fihsf1.net (formerly www·fihs·net)


Page 1 of 2 1 2 LastLast

Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 05:20 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com