MOD REQUEST/QUESTIO...
 
Notifications
Clear all

MOD REQUEST/QUESTION: Simple forum based off the review code?

9 Posts
4 Users
0 Reactions
2,282 Views
(@sullenriot)
Posts: 23
Eminent Member
Topic starter
 

So, I've been trying to learn some php. I can edit it just fine when it comes to mods and do a few simple mods. I'm wondering how hard it would be to create a simple forum within the site. I know there are a lot of bridges out there, but they aren't for me. I don't need alot, basically just an area where people can create some threads and post and reply.

I just tried out this tutorial:
http://www.chipmunk-scripts.com/board/index.php?forumID=43&ID=9268

So far I've gotten the forum working with the tables working in the efic tables, but it doesn't really pull an of the efic information, such as having a logged in user posting rather than an area for a user to add a random name. I do however suspect that between the code for the reviews and some of the pieces of this I could create a simple forum.

I'd appreciate any bits of advise anyone has before I attempt this, maybe someone has a better solution? I'm doing this on a test site, so I'm not overly concerned with breaking things, but I'd love to have a forum for my site members that's actually part of the site. The shout box is great but it just doesn't cut it when it comes to bringing together a community or when members are looking for writing help.

Best Regards,
Chrissy


 
Posted : 16/01/2010 2:41 am
 Elle
(@jenny)
Posts: 594
Honorable Member
 

It is funny you posted this topic, I've been thinking of a "blueprint" of how to do this. I haven't coded anything though -- I'm still working out the logistics.

From looking at the tutorial -- you want to link up "author" with fanfiction_authors.uid.

You need to attach the forum to the eFiction templates to make it "look" like eFic (ignore the styling in the tutorial) and this way, you  can also take advantage of isMEMBER and isADMIN and USERUID etc to add in your forum.

e.g.  (this is not all of them, just examples)

author column becomes an int value:

  author int NOT NULL default '',

$getthreads hooks up to fanfiction_authors

$getthreads="SELECT *, a.penname from forumtutorial_posts LEFT JOIN fanfiction_authors as a ON a.uid = author WHERE parentid='0' ORDER BY lastrepliedto DESC";

...

  $getthreads3[penname]=strip_tags($getthreads3[penname]);

...

<td><a href=""$url/viewuser.php?uid=$getthreads3[author"]" title="$getthreads3[penname]">$getthreads3[penname]</a></td>

post.php and reply.php: I'm going to assume you're only allowing members to post. So you can scrap the $_POST['name'] business and adding it as a field. What you need to do is, instead, use USERUID and isMEMBER to insert the member's UID number into the "author" column.

And... hopefully that should be voila.

Let me know if you have any issues.


archive: dramione.org
site: accio.nu

Available for skin/mod commission! πŸ™‚

 
Posted : 16/01/2010 8:53 am
(@sullenriot)
Posts: 23
Eminent Member
Topic starter
 

Thanks, that was basically my idea. It seemed simple enough. And yes, I only want members posting, we've had spam issues when we left even the reviews open. I suspect this will take a lot of tweeking, but it seems doable. My one thought with the review code would be the ability to delete posts, because after having tried this out it didn't seem I had any admin abilities. So if I can piece together that tutorial with some of the review code, maybe I can make it where Admins can delete posts.

Thanks for the advice, I'm going to try this out tonight, and I'd love to see whatever developments you have with yours. I'm not a fan of bridging because when it comes to upgrading you get stuck once again with having to update two scripts, one of which shares a user list with the other and things get messy. I feel like this would make more sense, I can upgrade and the tables will be all efic tables getting fixed while my forum tables remain the same.


 
Posted : 16/01/2010 1:43 pm
 Elle
(@jenny)
Posts: 594
Honorable Member
 

For deleting posts, you can just have something like this:

<?php

$delete = (isset($_GET["delete"]) && is_numeric($_GET["delete"] ? abs($_GET["delete"]) : null);

if ($delete) { // if there is a record ID
if (check_admin()) { // made up function -- check if the person deleting CAN delete
  $get = dbquery("SELECT postid FROM forum WHERE postid = '$delete'"); // check to see if the post exists
  if (dbnumrows($get) > 0) { // record found
  $del = dbquery("DELETE FROM forum WHERE postid = '$delete'");
  if ($del)
    print "<p>Post successfully deleted.</p>";
  }
  else { // no record found
  print "<p>No record found.</p>";
  }
}
}

else { // id not numeric
print "<p>No record found.</p>";
}
?>

Written from top of head; obviously you'll have to modify and integrate it somewhere that uses eFic coding. Say it's attached to an admin.php, it'll "work" on admin.php?delete=2 or something. Yesss.


archive: dramione.org
site: accio.nu

Available for skin/mod commission! πŸ™‚

 
Posted : 16/01/2010 2:34 pm
 CTW
(@ctw)
Posts: 5
Active Member
 

I was wondering if you ever got this idea to work??? 


 
Posted : 28/02/2010 2:25 pm
(@sullenriot)
Posts: 23
Eminent Member
Topic starter
 

I tried it out, but so far no luck getting it to be anything close to a smooth intergration. The forum is minimal and getting it to be something that an admin can moderate is probably beyond what I'm capable of. I may have another look at it soon. If and when I get it running I'll post it as a mod, but I'll be the first to admit this forum script is so basic it might not even be entirely worth it.


 
Posted : 01/03/2010 7:09 pm
 Elle
(@jenny)
Posts: 594
Honorable Member
 

@sullenriot, hey, I just e-mailed you.


archive: dramione.org
site: accio.nu

Available for skin/mod commission! πŸ™‚

 
Posted : 01/03/2010 7:29 pm
(@sullenriot)
Posts: 23
Eminent Member
Topic starter
 

Hey Elle,

I received your email and responded. Thanks a million!


 
Posted : 02/03/2010 1:41 am
(@tomas1402)
Posts: 16
Active Member
 

Hey, can post a step by step how to do it? It would be very useful, and
Mod can officially add

Thanks:).
Tomas.


 
Posted : 03/03/2010 8:35 am
Share: