The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Inserting a template via SQL Query
Hello
I am trying to insert new templates via SQL from an external application with the vb database as its database. The template itself is being inserted correctly into the database. I have made it so that if the template name i supply my script with matches a template name in the database it copies the code (template and template_un), otherwise the template is blank. This is all acting as I want it. However, when I make modifications to a template which has the same name as a vb default, it does not result in any of the changes being made to the theme. In fact, when I go to the style manager in the admincp, it does not seem to realise that there is a customised version of the template (it is not red). When I make modifications to the one in the style manager it says that there is already a template and any modifications will override it. Am I missing something here? How do I get vB to realise that there is a customised version of a default template? Thanks, |
#2
|
|||
|
|||
Looking at admincp/template.php in the "if ($_POST['do'] == 'updatetemplate')" section (around line 2236), it looks like if you are changing .css templates you need to call build_style() after (in includes/adminfunctions_template.php). Also if you change a template starting with 'bbcode_' you need to truncate the 'postparsed' table (but I'm guessing that's not part of the problem you're having).
|
#3
|
|||
|
|||
Aye. That's where I've been looking. The templates are neither bbcode nor css, so it doesn't apply
I do everything that template.php does, I think! This is the data I'm entering: PHP Code:
But I don't think this is the problem: everything is entered fine. I'll try entering a row into the adminlog. |
#4
|
|||
|
|||
I was looking at the wrong section. When you're modifying a template for a style that was inheriting that template, $_POST['do'] is set to 'inserttemplate'. In that section of the code it always calls print_build_style().
Edit: Specifically, it looks like the style table has a list of template ids for all templates in that style. Looks like a serialized array of arrays, so maybe if you don't want to call build_style you could try just updating that field. |
#5
|
|||
|
|||
You know what? I just discovered that myself! Coincidence much!? Just trying to get it to work now!
--------------- Added [DATE]1314837575[/DATE] at [TIME]1314837575[/TIME] --------------- Neither worked for me |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|