vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Member Archives (https://vborg.vbsupport.ru/forumdisplay.php?f=202)
-   -   Automatic creation of forums ( for articles comments ) (https://vborg.vbsupport.ru/showthread.php?t=12184)

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 :)

03-24-2001 11:56 AM

Quote:

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 :)

03-24-2001 03:57 PM

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. 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.

03-24-2001 03:59 PM

is that links script inLinks script ?

03-24-2001 04:01 PM

Quote:

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.

03-24-2001 04:03 PM

Quote:

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

03-24-2001 04:09 PM

Quote:

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.

03-24-2001 04:12 PM

Quote:

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

03-24-2001 04:20 PM

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):
Code:

mysql_query("INSERT INTO thread(threadid,title,lastpost,forumid,open,replycount,postusername,postuserid,lastposter,dateline,iconid,visible,attach) VALUES (NULL,'$THREADTITLE','".time()."','FORUMIDHERE','1','0','USERNAME','USERID','USERNAME','".time()."','1','1','0')");
Then, use this query to find out which THREADID your tutorial is related to:
Code:

$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:
Code:

$threadid = mysql_result($threadidresult,0,0);
mysql_query("INSERT INTO tutorialstablename (threadid) VALUES ($threadid)");

Finally, link it all up.
Code:

$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.

03-24-2001 04:21 PM

I must have taken a while. A whole conversation went on while I was replying. :D


All times are GMT. The time now is 06:02 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01966 seconds
  • Memory Usage 1,737KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_code_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete