vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Write This To Run.. MySQL (https://vborg.vbsupport.ru/showthread.php?t=73193)

Osterling 12-22-2004 02:36 AM

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.

Zachery 12-22-2004 03:06 AM

setting_add(); is a function, its not raw sql, you need to just run the script it came with.

Osterling 12-22-2004 03:14 AM

the script it came with doesn't seem to have ran it.. so i wanted to just run the query myself..

Dean C 12-22-2004 07:46 AM

I've closed your other thread, please do not double-post. Thanks :)

Osterling 12-22-2004 04:26 PM

Sorry bout that..

Is there anyone who can help me with this problem though.

Osterling 12-23-2004 07:46 PM

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

Osterling 12-24-2004 04:13 AM

can someone please help me :(

Brad 12-24-2004 05:21 AM

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

Osterling 12-24-2004 05:59 AM

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

Osterling 12-24-2004 04:12 PM

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


All times are GMT. The time now is 01:55 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.01403 seconds
  • Memory Usage 1,741KB
  • 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
  • (2)bbcode_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)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