vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3 Articles (https://vborg.vbsupport.ru/forumdisplay.php?f=187)
-   -   [How-To] Product Managament (vBulletin 3.5 RC 1 and up) (https://vborg.vbsupport.ru/showthread.php?t=92953)

Andreas 09-29-2005 11:58 AM

Athough you can edit the XML manually (if you really know what you are doing), but in 99,9999% of all situations this is not necessary.

JJR512 09-29-2005 01:22 PM

OK, I must have the wrong concept in my head. Or I'm confused about something.

I thought that with this new system you would have to write the XML file essentially from scratch.

Andreas 09-29-2005 01:24 PM

You can ... but i'd not suggest doing that, could give major headaches ;)

- Create a Product
- Create all the necessary Phrases / Settings / Plugins / Templates and make sure you select the product
- Add necessary Install/Uninstall code
- Export it

Done.

akanevsky 10-01-2005 02:24 PM

For some reason, it won't export vbulletin options for me...
It does export the vbulletin option phrases, but the option category itself (<options></options>) is blank... why?

Adrian Schneider 10-01-2005 02:26 PM

Quote:

Originally Posted by Dark Visor
For some reason, it won't export vbulletin options for me...
It does export the vbulletin option phrases, but the option category itself (<options></options>) is blank... why?

Did you set the setting group + setting as vBulletin default?

akanevsky 10-01-2005 02:28 PM

No, I set it as non-default... I thought that it will prevent the setting to be deleted on vbulletin upgrade. Or no?

Adrian Schneider 10-01-2005 02:29 PM

That's what I thought too, set them all to default otherwise it won't export. They should rephrase that...

akanevsky 10-01-2005 02:53 PM

Ok thanx.

Boofo 10-01-2005 03:48 PM

Quote:

Originally Posted by Dark Visor
Ok thanx.

As long as the setting it attached to a product, it will be fine.

Cap'n Steve 10-05-2005 06:22 AM

Actually, it's not fine. It seems if you add settings to one of the default groups, they won't export unless "vBulletin Default" is set to yes. It also seems to not even save the title and description of the setting. Is this the way it's supposed to be?

Boofo 10-05-2005 06:46 AM

I have added settings and they show up like normal even after an upgrade. yes, you need to have it set to yes for "vBulletin Default" but if it is still attached to a product, it is there. And mine saved the title and description also. I'm not sure why it isn't working for you. :(

Cap'n Steve 10-05-2005 06:56 AM

So what's the vBulletin Default setting do? The description is misleading, to say the least.

Boofo 10-05-2005 06:59 AM

Kirby could probably answer that better than I could. I was just told in order to export it and have it retain the settings you entered, you must have it set to yes and attached to a product.

Marco van Herwaarden 10-05-2005 06:42 PM

The term 'vBulletin Default' is something that is inherited from older versions. The phrase should be changed to somehting that more fits the current situation.

Andreas 10-05-2005 08:03 PM

As already pointed out, "vBulletin Default" is misleading.
The correct meaning would be smth. like "Default Setting<dfn>This setting will be replaced during upgrades of the Product this setting does belong to</dfn>"

Cap'n Steve 10-06-2005 03:15 AM

That would help, but I still don't understand why this setting exists. If you set it no, it's almost like the setting isn't attached to your product. It won't export or uninstall with the product it's part of unless vBulletin Default is set to yes.

Andreas 10-06-2005 08:34 AM

Yes. That's was this option is for:
Making custom settings that won't be affected by upgrades.
And as they are custom settings, they won't be exported with the product.

buro9 10-06-2005 09:35 AM

Oh my... I should've read this... I crafted the secret admirer one by hand, poking around in the code trying to determine what it wanted, and guessing bits as I went along!

Well, I don't think I did badly :D

Jenta 10-07-2005 04:26 PM

Something peculiar I've discovered.

If your product involves templates and they are edited after installation, when an upgrade takes place, the modified template stays in use. Admins need to be made aware to click revert just like stock templates on vb upgrades.

I think also in one instance, I edited the product xml file by hand but didn't change the timestamp of when the template was authored. Not done testing this but I think if the dates are the same you may wind up with the same situation even though the templates have changed.

Almost forgot...
If they install a product, edit the template and then uninstall the product the template will not be uninstallled. It will move up to custom templates in the template list.

Andreas 10-07-2005 09:09 PM

Templates behave the same way like standard vBulletin Templates:
Customizations will not be affected by Updates; If customized Templates are no longer compatible they will be reverted.
Also, if you have customized Templates and these Templates no longer exist in the MASTER style of upcoming vBulletin Versions, they will show up as custom.
I don't think that this is a big issue - it just wastes some table space.
The timestamp does not matter - whenever you import a product XML all master style templates with the productid will be deleted first.

Andreas 11-02-2005 01:33 AM

<font size="3">Important change in vBulletin 3.5.1</font>

Product install code is now executed before the product gets inserted into the database; this way you can run any necessary pre-installation checks (mySQL Version, files are in place, etc.) and abort the instalation if necessary.

Code Monkey 11-13-2005 07:40 PM

What's the best way to go about updating a product?

Say you add a new field to a table with an update.

Do you just put an alter table?

Will it just skip it in future updates if they already have the field?

Or should you just have a seperate upgrade script?

Marco van Herwaarden 11-13-2005 07:58 PM

Just put the alter statement for the new version upgrade code.

timetunnel 12-01-2005 03:25 AM

This is a wonderful thread...

This is my introduction to this feature. It sure puts a whole new light on the extent to what this software can do!

QUESTION: is it ok to leave the debug enabled or should it be disabled after the product is created, or does it matter? Is there any security issue to consider if left enabled 'permanently'?

Thanks in advance.

DaveAK 01-01-2006 06:06 AM

Quote:

Originally Posted by Revan
That's really anal. That's like saying "I refuse to zip my hacks because I hate the WinZip program. I am blatantly ignoring the fact that WinRar/WinAce/[insert name of unpacking software for Mac/Linux/Unix] can unpack these files."
Making the How-to's HARDER to use is IMHO completely against the point of making them. I consider this a kick in the nuts to the community. This paragraph (and only this) will be retracted if someone can show me a way to copy/paste from Adobe Reader. I refuse to install any other piece of software to be able to copy/paste from a .pdf document, as I do not feel the need to clutter my computer with crap that will be used 1 or 2 times.
At any rate, see if you can stop me from making CHM files on my own computer (not to distribute).

Now to get back on the actual topic:
Ive learned the hard way that settings have to be volatile for them to be able to export properly, but won't this erase them on upgrade? The code in the xml_import_settings() makes me think that if you are trying to re-import settings that are marked as volatile, it will recreate these settings. This is not a desired effect, so I hope someone can prove me wrong :p

Ever tried the "Select Text" tool in Adobe Reader? The one where you can highlight text, and copy it to the clipboard for pasting into other applications? Try it and then you can retract your paragraph. :)

monotreme 01-20-2006 08:23 PM

is this the only way to export your plugins?

echamberlain 11-03-2006 04:37 PM

Is there a way to bundle php code within the product installation process?

It would be nice if the install was one xml file import and not an import, plus an upload.

Cap'n Steve 11-03-2006 10:06 PM

When you edit a product, there's a place to put install and uninstall code.

diades 03-01-2007 03:23 PM

Hi

I am in the process of converting any hacks etc., to do this, I read the manual for any info and then looked at the xml files that came with the installation and some of the product hacks that are around.
I then wrote a basic product, imoported it and then exported it to see if there were any changes in the file.
This led to more research and that is the reason that I am posting here.

This is the basic "product" xml file (without values) that I have gleaned thus far:
Code:

<?xml version="1.0" encoding="UTF-8"?>
<product xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="D:\Inetpub\wwwroot\webxpertz_net\products\product.xsd">
  <title></title>
  <description></description>
  <version></version>
  <url></url>
  <versioncheckurl></versioncheckurl>
  <dependencies maxversion="" minversion="" dependencytype=""></dependencies>
  <codes>
    <code version="">
      <installcode></installcode>
      <uninstallcode></uninstallcode>
    </code>
  </codes>
  <templates>
    <template date="" username="" name="" templatetype="" version=""></template>
  </templates>
  <plugins>
    <plugin executionorder="" active="">
      <title date="" username="" executionorder="" active="" version=""></title>
      <hookname></hookname>
      <phpcode></phpcode>
    </plugin>
  </plugins>
  <phrases>
    <phrasetype fieldname="" name="">
      <phrase date="" username="" name="" version=""></phrase>
    </phrasetype>
  </phrases>
  <options displayorder="" name="">
    <settinggroup varname="" displayorder="">
      <setting varname="" displayorder="">
        <datatype></datatype>
      </setting>
    </settinggroup>
  </options>
  <helptopics hasphrases="" product="" vbversion="">
    <helpscript name="">
      <helptopic disp="">
        <title date="" username="" version=""></title>
        <text date="" username="" version=""></text>
      </helptopic>
    </helpscript>
  </helptopics>
  <cronentries>
    <cron></cron>
  </cronentries>
  <faqentries>
    <faqtype>
      <faq></faq>
    </faqtype>
  </faqentries>

</product>

No I am trying to find out if the attributes are correct and, what, if any, are the attributes, child elements for the elements in red.
There does not seem to be a gui for that data in th cp (although I may have missed it) so, if someone can shed some light, I would be grateful.
I have written a schema for the file (as it is above) as I prefer to write the product offline as an xml file and then just import it. Thiat is also the reason for the schema, it makes life easier.
Thanks for any help.

echamberlain 03-01-2007 10:01 PM

That data is all in AdminCP->vBulletin Options. Where you add/edit Settings groups and additional settings.

The xml format is really meant to be auto-generated for import/export and isn't intended to be edited by hand.

I find it much easier to develop mods in my development environment, then let the export generate the xml file.

diades 03-01-2007 10:24 PM

Hi Eric

Thanks for the reply!

I have already fiound some errors/differences with that xml that I had. I have just set-up a test forum (we just moved server) so I am not so leary of playing now. With debug mode operational I have found varying things that I hadn't before.

Still digging!

I find it far easier to edit/programme on my desktop and can read the xml quite readily so no real problem there, each to his/her own I suppose :

thalamus 10-16-2007 06:18 PM

I've set up a very small, but useful, plugin for my 3.6.8, and now processing it to be a product. It needs an upload of a .js file into the clientscript folder, but it also needs to add a single line into the headinclude template (basically the <script src> tag for the new uploaded .js file).

Is there a way to append to an existing template in the product xml file and, if so, can anyone clarify the command(s)?

If not, does anyone know of a related hook that I can use, so that I can just add this tag content onto the headinclude template?

TIA :)

Blackhat 10-30-2008 01:32 PM

Im new to this and have managed to alter the database when I load the xml file, but how can I add more information to the file, cause all I see is install and uninstall code areas. What about the hooks, do I have to make another xml file for that or can I include all in one ?

Thanks :o


All times are GMT. The time now is 04:44 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02421 seconds
  • Memory Usage 1,816KB
  • 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
  • (1)bbcode_code_printable
  • (3)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
  • (33)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