PHP Web Host - Quality Web Hosting For All PHP Applications Sign up for PayPal and start accepting credit card payments instantly
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
Post new topic   Reply to topic
Author Message
thundarfoot
Regular
Regular


Joined: Jan 16, 2008
Posts: 75

PostPosted: Mon Feb 25, 2008 8:40 pm Reply with quote Back to top

I am use ing ravens 7.9
I want to create about 500 forum topics is there an easy way to just change a mysql table or something? I can click through the forum and manualy create but....would liek a time saver

thank you
View user's profile Send private message
kguske
Site Admin


Joined: Jun 04, 2004
Posts: 4615

PostPosted: Mon Feb 25, 2008 9:04 pm Reply with quote Back to top

Strange - RavenNuke is based on PHP-Nuke 7.6, and it's version hasn't passed 2.20.1 - did I miss something? Smile

Are you trying to convert these from another forum, or simply inserting 500 new forum topics? If you are converting, there may be scripts to help with that (see phpbb.com). If not converting, you might wish to look at the convert code to see how to generate the SQL to create the topic, first post, and associated tables. Unfortunately, it isn't just one table.
View user's profile Send private message
thundarfoot
Regular
Regular


Joined: Jan 16, 2008
Posts: 75

PostPosted: Mon Feb 25, 2008 9:29 pm Reply with quote Back to top

Lol
Just inserting new topics...
View user's profile Send private message
kguske
Site Admin


Joined: Jun 04, 2004
Posts: 4615

PostPosted: Mon Feb 25, 2008 10:26 pm Reply with quote Back to top

Look at includes/functions_post.php, specifically at function submit_post (after it calls prepare_post).

It inserts records into these tables:
nuke_bbtopics
nuke_bbposts
nuke_bbposts_text

It's called from modules/Forums/posting.php, so you can see which parameters are used and how. Also, after submit_post, it executes additional functions:
update_post_stats
user_notification

As you can see, it isn't trivial. If you want to use the function to generate the records from a script, remember that determining the correct files to include can be quite a challenge. It might be easier to figure out what the SQL is doing and go from there.
View user's profile Send private message
Gremmie
Moderator


Joined: Apr 06, 2006
Posts: 2322
Location: Iowa, USA

PostPosted: Tue Feb 26, 2008 8:52 am Reply with quote Back to top

Here is an easy way to create 500+ forum topics. Change the permissions on your forums so that anyone can post. Come back in about a week.
View user's profile Send private message
Gremmie
Moderator


Joined: Apr 06, 2006
Posts: 2322
Location: Iowa, USA

PostPosted: Tue Feb 26, 2008 8:54 am Reply with quote Back to top

But seriously, if you are using RavenNuke, turn on that awesome new logging feature. Then create a post manually. Then go check the log and you'll see all the SQL that happened. Put that in a script and loop over it 500 times. Smile
View user's profile Send private message
kguske
Site Admin


Joined: Jun 04, 2004
Posts: 4615

PostPosted: Tue Feb 26, 2008 11:30 am Reply with quote Back to top

Nice...
View user's profile Send private message
Display posts from previous:       
Post new topic   Reply to topic

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2008 by Raven
Proud to be listed at Lobo Links Web Directory

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::

:: fisubice Theme Recoded To 100% W3C CSS & HTML 4.01 Transitional Compliance by Raven and 64bitguy ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum