Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 12-22-2004, 02:36 AM
Osterling Osterling is offline
 
Join Date: Jan 2004
Posts: 381
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Write This To Run.. MySQL

alright i have this mysql:

Code:
setting_add('v3 Articles Introduction', 'This introduction text will appear at the top of the main v3 Articles page. Use it to describe the purpose of the Articles section.', 'articleintroduction', '', '', 'textarea', '1');
		setting_add('Comments Per Page', 'The number of comments to display on each page.', 'commentsperpage', '10', '10', '', '20');
		setting_add('Comment Character Limit', 'The maximum character length of a user\'s comment.', 'commentlimit', '500', '500', '', '30');
		setting_add('Articles Per Page', 'The number of articles to display on each page.', 'articlesperpage', '10', '10', '', '40');
		setting_add('Article Attachment Limit', 'The maximum number of files which can be attached to an article.', 'maxarticleattachments', '10', '10', '', '50');		
		setting_add('Thumbnails Per Row', 'The number of "thumbnails", or media items to display per row.', 'artthumbsperrow', '4', '4', '', '60');
		setting_add('Featured Article Preview Length', 'The number of characters to display before the preview text is truncated.', 'featuredlength', '550', '550', '', '70');
but when i run it it says..

Quote:
#1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'setting_add('v3 Articles Introduction', 'This introduction text
I am trying to run it so it goes into the Setting table.. any help would be apperciated.
Reply With Quote
  #2  
Old 12-22-2004, 03:06 AM
Zachery's Avatar
Zachery Zachery is offline
 
Join Date: Jul 2002
Location: Ontario, Canada
Posts: 11,440
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

setting_add(); is a function, its not raw sql, you need to just run the script it came with.
Reply With Quote
  #3  
Old 12-22-2004, 03:14 AM
Osterling Osterling is offline
 
Join Date: Jan 2004
Posts: 381
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

the script it came with doesn't seem to have ran it.. so i wanted to just run the query myself..
Reply With Quote
  #4  
Old 12-22-2004, 07:46 AM
Dean C's Avatar
Dean C Dean C is offline
 
Join Date: Jan 2002
Location: England
Posts: 9,071
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I've closed your other thread, please do not double-post. Thanks
Reply With Quote
  #5  
Old 12-22-2004, 04:26 PM
Osterling Osterling is offline
 
Join Date: Jan 2004
Posts: 381
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sorry bout that..

Is there anyone who can help me with this problem though.
Reply With Quote
  #6  
Old 12-23-2004, 07:46 PM
Osterling Osterling is offline
 
Join Date: Jan 2004
Posts: 381
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Can anyone tell me how to ether run a queery to set this up, or how to add it through vbulletin if that makes sense
Reply With Quote
  #7  
Old 12-24-2004, 04:13 AM
Osterling Osterling is offline
 
Join Date: Jan 2004
Posts: 381
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

can someone please help me
Reply With Quote
  #8  
Old 12-24-2004, 05:21 AM
Brad Brad is offline
 
Join Date: Nov 2001
Posts: 4,765
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What you posted is not SQL, it is a collection of functions that will build SQL and excute it. Without knowing what these functions are doing no one will be able to help you.

Where did you get this code from (the vB articles hack?).
Reply With Quote
  #9  
Old 12-24-2004, 05:59 AM
Osterling Osterling is offline
 
Join Date: Jan 2004
Posts: 381
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Brad.loo
What you posted is not SQL, it is a collection of functions that will build SQL and excute it. Without knowing what these functions are doing no one will be able to help you.

Where did you get this code from (the vB articles hack?).
Yes.. but for some reason this did not install it fully.. since those are the things that would show up on the vboption > v3 article page, but it doesn't. So what I need to do is figure out a way to set it up... So I am so confused, and no one seems to be able to help me on figuring out why that didn't install it for me..

help please
Reply With Quote
  #10  
Old 12-24-2004, 04:12 PM
Osterling Osterling is offline
 
Join Date: Jan 2004
Posts: 381
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Here is the full install part

Code:
// Add v3 Article settings
	if ($_REQUEST['caction'] == 2)
	{
		
		$DB_site->query("INSERT INTO " . TABLE_PREFIX . "settinggroup (grouptitle, displayorder, volatile) VALUES ('v3_articles', '2000', '0')");
		$DB_site->query("INSERT INTO " . TABLE_PREFIX . "phrase (phraseid, languageid, varname, text, phrasetypeid) VALUES (NULL, '0',  'settinggroup_v3_articles', 'v3 Articles', '5000')");
		
		setting_add('v3 Articles Introduction', 'This introduction text will appear at the top of the main v3 Articles page. Use it to describe the purpose of the Articles section.', 'articleintroduction', '', '', 'textarea', '1');
		setting_add('Comments Per Page', 'The number of comments to display on each page.', 'commentsperpage', '10', '10', '', '20');
		setting_add('Comment Character Limit', 'The maximum character length of a user\'s comment.', 'commentlimit', '500', '500', '', '30');
		setting_add('Articles Per Page', 'The number of articles to display on each page.', 'articlesperpage', '10', '10', '', '40');
		setting_add('Article Attachment Limit', 'The maximum number of files which can be attached to an article.', 'maxarticleattachments', '10', '10', '', '50');		
		setting_add('Thumbnails Per Row', 'The number of "thumbnails", or media items to display per row.', 'artthumbsperrow', '4', '4', '', '60');
		setting_add('Featured Article Preview Length', 'The number of characters to display before the preview text is truncated.', 'featuredlength', '550', '550', '', '70');
Can anyone either put this into a query so I can run it, or tell me how to add these settings through admincp.. please
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 03:49 PM.


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.07815 seconds
  • Memory Usage 2,274KB
  • Queries Executed 14 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_code
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete