View Full Version : Automatic creation of forums ( for articles comments )
dubucm
03-24-2001, 07:42 AM
Hi all !
first sorry for my english ( i m french ... ) i am webmaster of a website which provide tutorials and articles. And i would like to have a system of comments for each tutorials.
So i' d like to have a link : [ Review / Comments ] at the end of each of my tutorials which redirect the user to the thread corresponding to the tut's.
My tutorials are all dynamic ( i mean PHP/MySQL ) so i should found a way to have a "dynamic link" for review/comments and a dynamic way to create the thread for the tutorial when i add it.
Thx for ideas :)
Originally posted by dubucm
Hi all !
first sorry for my english ( i m french ... ) i am webmaster of a website which provide tutorials and articles. And i would like to have a system of comments for each tutorials.
So i' d like to have a link : [ Review / Comments ] at the end of each of my tutorials which redirect the user to the thread corresponding to the tut's.
My tutorials are all dynamic ( i mean PHP/MySQL ) so i should found a way to have a "dynamic link" for review/comments and a dynamic way to create the thread for the tutorial when i add it.
Thx for ideas :)
kikooo martin :)
dubucm,
I am in the middle of re-doing my site that allows this. I have achieved everything so far by just making template changes. You can see a sneak preview at test.BritishExpats.com (http://test.britishexpats.com/index.php). Click on the 'Articles' menu on the top left menu and you can see a few examples in there. Drill down until you see the article come up and there is a rating option, printable, send to friend etc, just like a normal thread.
Like I said, this is all done with templates. The articles are stored as threads. The examples in there already don't allow comments, but the next category I'm working on will.
is that links script inLinks script ?
Originally posted by eva2000
is that links script inLinks script ?
Yep... it's very buggy out of the box. I had to clean up their code a lot. It's NOT worth the money. But it's a lot cheaper than Links.
Originally posted by fastforward
Yep... it's very buggy out of the box. I had to clean up their code a lot. It's NOT worth the money. But it's a lot cheaper than Links. thanks ... inlinks was on my list to test - still www.indexu.com seems like the script i might end up using
best of all license for indexu.com allows 2 installs
Originally posted by eva2000
thanks ... inlinks was on my list to test - still www.indexu.com seems like the script i might end up using
best of all license for indexu.com allows 2 installs
I was looking at that one too but it seemed an overkill for what I wanted. It does look good though. Could you please post a review when you get a chance to test it if you don't mind.
Originally posted by fastforward
I was looking at that one too but it seemed an overkill for what I wanted. It does look good though. Could you please post a review when you get a chance to test it if you don't mind. yes definitely will do - i remember a very long thread last year in teh chit chat forum about link directory scripts
Assuming you have a script to put your tutorials in the database and you're using the same database for the vB and your tutorials, use this query where you are inserting your tutorial into the database (I assume you have a variable that holds the title of the tutorial - put that where you see $THREADTITLE, and put the forumid of the forum you want the thread in where you see FORUMIDHERE, and finally you'll need to put your USERID and USERNAME where you see those below):
mysql_query("INSERT INTO thread(threadid,title,lastpost,forumid,open,replyc ount,postusername,postuserid,lastposter,dateline,i conid,visible,attach) VALUES (NULL,'$THREADTITLE','".time()."','FORUMIDHERE','1','0','USERNAME','USERID','USERN AME','".time()."','1','1','0')");
Then, use this query to find out which THREADID your tutorial is related to:
$threadidresult = mysql_query("SELECT threadid FROM thread WHERE title='$THREADTITLE'");
You'll need to add a column to your tutorial's table called threadid, and then do the following (replace tutorialstablename with your tutorial's table name:
$threadid = mysql_result($threadidresult,0,0);
mysql_query("INSERT INTO tutorialstablename (threadid) VALUES ($threadid)");
Finally, link it all up.
$threadidlink = mysql_query("SELECT threadid FROM tutorialstablename WHERE title='$threadtitle'");
$threadid = mysql_result($threadidlink,0,0);
$reviewslink = "[<a href=\"http://www.mysite.com/forums/showthread.php?threadid=$threadid\"> Review / Comments </a>]";
And use $reviewslink where you need it.
I must have taken a while. A whole conversation went on while I was replying. :D
Originally posted by fastforward
dubucm,
I am in the middle of re-doing my site that allows this. I have achieved everything so far by just making template changes. You can see a sneak preview at test.BritishExpats.com (http://test.britishexpats.com/index.php). Click on the 'Articles' menu on the top left menu and you can see a few examples in there. Drill down until you see the article come up and there is a rating option, printable, send to friend etc, just like a normal thread.
Like I said, this is all done with templates. The articles are stored as threads. The examples in there already don't allow comments, but the next category I'm working on will.
Nice system!
You've done a nice work ! ....
but my website as a separate architecture for forums and articles... i mean that i do not want to do all with VBulletin ....
If you have 2 min look at www.flashkit.com they have tutorials with a REVIEW/COMMENTS button which bring you to a thread in an "invisible" forum....
I think it s a really good system ! ... and i want to have that sort of system .... i mean : when i add a tut it automatically create a thread in an invisble forum ( in my "normal" forum list ) with a title of the tutorial and the message => the desc. of the tutorial.
So i want in fact to know how to generate a thread in a specific forum form an external form ( ext. form vbulletin ) and i need too to keep the link to this forum in order to add a review/comment button ....
can anyone understand what i mean :) ?
I thought you said you wanted to post a new thread to vB every time you posted an article, which is what the code above does, assuming everything's in the same database. If it's not, let me know and I'll work on it some more.
I sent you (dubucm) back a PM with how to do the invisible forum, but for everyone else following this thread: Just edit your forum, and set "Is active?" to "no". This will make it so (despite the name) it *is* active, however it is not visible from any page except a direct link to it (e.g. http://myforums.com/forumdisplay.php?forumid=xx).
In fact, they are not on the same db ... but i ll just add a db_select before the query to create the forum.
I think i can manage... :)
I ll try all that this night... ( yes it s 10 pm in france but after we explode japan in soccer :) )
I ll let you know if i have trouble with this :)
Thank you SO much for taking some min's to help me ... the VBulletin community is really cool .... :)
Glad to be one of you :)
Keep up the good work !
( yes it s 10 pm in france but after we explode japan in soccer :) )
[/B][/QUOTE]
Lol
pfffff.....easy for Zidane
We are champion of the world but not in 2008...
except
that very interessant thread!
Thx
Waoh ... i've just finish...
it's ok and it works really fine :)
... but it was a hard PHP Time :)
=> So now i want to make a systeme to automaticly send e mail to the article author when a message is poster in the thread relating to his article.
Can i make him a moderator of only the thread ? What should i do ? :)
PS : if someone is interested by the PHP Code i can share it...
I'm very interested on this php code, I use indexu and I would love to have VB integrated with it :)
No problem ... i'll prepare that for you with english comments and post it in a new thread. :)
Thanks a lot I appreciate it!
Originally posted by conan
Thanks a lot I appreciate it!
Arf your avatar is the same than Martin :(
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.