The Arcive of vBulletin Modifications Site. |
|
|
#1
|
||||
|
||||
|
For some reason I cannot get this code to work, am I just missing something simple?
Code:
$db->query_write("
INSERT INTO " . TABLE_PREFIX . "bbcode
(bbcodetag, bbcodereplacement, bbcodeexample, bbcodeexplanation, twoparams, title, buttonimage, options)
VALUES
('fa', '<i class="fa %1$s"></i>', '[fa]fa-male[/fa]', 'Use Font Awesome icons. For a list of available icons see here: https://fortawesome.github.io/Font-Awesome/icons/', 0, 'Font Awesome', '', 31)
");
build_bbcode_cache();
|
|
#2
|
||||
|
||||
|
Try adding this line before the query:
PHP Code:
|
|
#3
|
||||
|
||||
|
Didn't make a difference. Here is the full xml file, just in case
Code:
<?xml version="1.0" encoding="ISO-8859-1"?>
<product productid="dso_fa" active="1">
<title>DSO - Font Awesome</title>
<description>Adds Font Awesome v4.4.0 support to vBulletin</description>
<version>1.0.0</version>
<url />
<versioncheckurl />
<dependencies>
<dependency dependencytype="vbulletin" minversion="4.1.8" maxversion="" />
</dependencies>
<codes>
<code version="1.0.0">
<installcode><![CDATA[$db->query_write("
INSERT INTO ".TABLE_PREFIX."bbcode
(bbcodetag, bbcodereplacement, bbcodeexample, bbcodeexplanation, twoparams, title, buttonimage, options)
VALUES
('fa', '<i class="fa %1$s"></i>', '[fa]fa-male[/fa]', 'Use Font Awesome icons. For a list of available icons see here: https://fortawesome.github.io/Font-Awesome/icons/', 0, 'Font Awesome', '', 31)
");
build_bbcode_cache();]]>
</installcode>
<uninstallcode><![CDATA[$db->query_write("
DELETE FROM ".TABLE_PREFIX."bbcode WHERE bbcodetag = 'fa' LIMIT 1;
");
build_bbcode_cache();]]>
</uninstallcode>
</code>
</codes>
<templates>
</templates>
<stylevardfns>
</stylevardfns>
<stylevars>
</stylevars>
<plugins>
<plugin active="1" executionorder="5">
<title>Font Awesome CSS</title>
<hookname>parse_templates</hookname>
<phpcode><![CDATA[$dso_fa_css = " <link rel=\"stylesheet\" type=\"text/css\" href=\"./DSO/font-awesome-4.4.0/css/font-awesome.css\" />";
$template_hook['headinclude_css'] .= $dso_fa_css;]]></phpcode>
</plugin>
</plugins>
<phrases>
</phrases>
<options>
</options>
<helptopics>
</helptopics>
<cronentries>
</cronentries>
<faqentries>
</faqentries>
<navigation>
</navigation>
</product>
|
|
#4
|
||||
|
||||
|
Okay, try this as your query:
Code:
$db->query_write("
INSERT INTO " . TABLE_PREFIX . "bbcode
(bbcodetag, bbcodereplacement, bbcodeexample, bbcodeexplanation, twoparams, title, buttonimage, options)
VALUES
('fa', '<i class="fa %1\$s"></i>', '[fa]fa-male[/fa]', 'Use Font Awesome icons. For a list of available icons see here: https://fortawesome.github.io/Font-Awesome/icons/', 0, 'Font Awesome', '', 31)
");
build_bbcode_cache();
|
| Благодарность от: | ||
| Dragonsys | ||
|
#5
|
||||
|
||||
|
nope, but it did get me in the right area. I replaced all the varchar with 1 2 3 etc, and now it inserts. So I just have to try one at a time to find the faulty one.
Thank you |
| Благодарность от: | ||
| MarkFL | ||
|
#6
|
||||
|
||||
|
Quote:
Code:
$db->query_write("
INSERT INTO " . TABLE_PREFIX . "bbcode
(bbcodetag, bbcodereplacement, bbcodeexample, bbcodeexplanation, twoparams, title, buttonimage, options)
VALUES
('fa', '<i class=\"fa %1\$s\"></i>', '[fa]fa-male[/fa]', 'Use Font Awesome icons. For a list of available icons see here: https://fortawesome.github.io/Font-Awesome/icons/', 0, 'Font Awesome', '', 31)
");
build_bbcode_cache();
|
| Благодарность от: | ||
| Lynne | ||
|
#7
|
||||
|
||||
|
that was it. I knew it was something simple I was forgetting. Thanks Mark
|
![]() |
|
|
| X vBulletin 3.8.12 by vBS Debug Information | |
|---|---|
|
|
More Information |
|
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|