The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Marco van Herwaarden CODERS PLEASE DISCUSS!!!... 07-27-2005, 04:14 PM
deathemperor exactly what I was thinking... 07-27-2005, 04:19 PM
Marco van Herwaarden Let's make it perfect as a... 07-27-2005, 04:24 PM
Andreas Hmm, it adds 1 Query to every... 07-27-2005, 04:34 PM
Adrian Schneider Thanks Macro, I will test... 07-27-2005, 04:54 PM
Marco van Herwaarden Yes that is also why i wrote... 07-27-2005, 05:05 PM
Marco van Herwaarden I ran into the datastore... 07-27-2005, 05:06 PM
amykhar I haven't been able to get... 07-27-2005, 05:09 PM
Andreas Yes. But as the Tables won't... 07-27-2005, 05:15 PM
Marco van Herwaarden You mean you want to load ALL... 07-27-2005, 05:18 PM
Marco van Herwaarden Not really, bandwidth is not... 07-27-2005, 05:20 PM
Andreas What I meat was a serialized... 07-27-2005, 05:22 PM
Marco van Herwaarden I will have a sleep over this... 07-27-2005, 05:28 PM
Andreas I am not sure either :)
But... 07-27-2005, 05:32 PM
Link14716 I say it should load all the... 07-27-2005, 05:46 PM
Marco van Herwaarden I will also have a go at... 07-27-2005, 07:58 PM
tamarian Great idea, here are some... 07-27-2005, 08:01 PM
Marco van Herwaarden Thanks for the input... 07-27-2005, 08:21 PM
Chris M It sounds like a great... 07-27-2005, 09:31 PM
merk I thought if you had another... 07-27-2005, 11:26 PM
Marco van Herwaarden Second Alternative presented.... 07-28-2005, 02:59 PM
merk If the plugin system is... 07-29-2005, 12:26 AM
deathemperor Sorry if this goes off topic,... 07-29-2005, 01:12 AM
Marco van Herwaarden I don't think that would... 07-29-2005, 03:32 AM
Andreas Hook cache_templates 07-29-2005, 08:25 AM
Andreas Uhh, yes - that is a Problem.... 07-29-2005, 08:35 AM
Marco van Herwaarden Already answered by:
... 07-29-2005, 08:48 AM
Marco van Herwaarden I am a bit disappointed at... 07-29-2005, 08:52 PM
Paul M Probably because having read... 08-05-2005, 08:15 PM
Revan So let me see if I understood... 08-05-2005, 08:36 PM
Link14716 The problem is then you have... 08-05-2005, 08:52 PM
Revan So what if you have to CHMOD... 08-05-2005, 08:57 PM
Erwin That's what I've done in the... 08-06-2005, 01:44 AM
Marco van Herwaarden Nice to see there is some... 08-06-2005, 05:45 AM
Revan How does it defeat the... 08-06-2005, 10:27 AM
Marco van Herwaarden This is why i opened the... 08-06-2005, 11:06 AM
Andreas @Revan
Not every Hack that... 08-06-2005, 12:32 PM
Revan How can I make a custom class... 08-06-2005, 05:12 PM
amykhar Easy require the special... 08-06-2005, 06:19 PM
Revan Eh? Gonna need abit more... 08-06-2005, 07:20 PM
amykhar Look at the top of just about... 08-06-2005, 07:33 PM
Andreas @Marco (and of course also... 08-06-2005, 08:11 PM
phlogiston So far I've had to add two... 08-06-2005, 10:47 PM
Revan Thanks for the lesson, it... 08-07-2005, 12:21 AM
Marco van Herwaarden Putting them in global should... 08-07-2005, 07:05 AM
Andreas Monday has almost passed ...... 08-08-2005, 08:42 PM
Marco van Herwaarden Yeah i know, and i didn't hae... 08-08-2005, 08:48 PM
Andreas *bump*
? 08-16-2005, 09:55 PM
merk I really think the solution... 08-16-2005, 11:09 PM
Andreas That's basically my idea :)
... 08-16-2005, 11:32 PM
merk But since templates can... 08-16-2005, 11:36 PM
Andreas Phrasegroups for Example... 08-16-2005, 11:50 PM
merk Looking at the other classes,... 08-16-2005, 11:59 PM
Andreas Right. But how would the... 08-17-2005, 12:05 AM
merk Hope it doesnt come across as... 08-17-2005, 12:28 AM
Andreas Seems like you don't... 08-17-2005, 09:20 AM
merk Maybe just a crossed wire :)... 08-17-2005, 01:17 PM
Andreas Well, the Item won't be... 08-17-2005, 07:56 PM
merk <!-- edit: this bit can be... 08-17-2005, 10:23 PM
Andreas How does the Datastore Class... 08-17-2005, 11:22 PM
merk Looking at the code, there is... 08-17-2005, 11:27 PM
Andreas Yes, all Data (that was once... 08-17-2005, 11:35 PM
merk Now i see what you're asking!... 08-17-2005, 11:39 PM
Marco van Herwaarden By the time we started this... 08-18-2005, 05:46 AM
merk Im sorry, I dont have the... 08-18-2005, 08:44 AM
Marco van Herwaarden Looks like that was somehow... 08-18-2005, 11:42 AM
merk What I have been doing for my... 08-18-2005, 12:18 PM
bigcurt I am sure they havent decided... 08-18-2005, 03:58 PM
merk To be perfectly honest, I... 08-19-2005, 12:55 AM
merk I've been thinking about a... 08-21-2005, 11:38 PM
merk Ive just hit a major major... 09-10-2005, 09:44 PM
Andreas File Edits.
If you do it in... 09-10-2005, 11:30 PM
merk config.php - interesting.
... 09-10-2005, 11:31 PM
Andreas if (THIS_SCRIPT ==... 09-10-2005, 11:34 PM
Boofo Here's what I use the Kirby... 09-13-2005, 12:28 AM
merk If you put that into... 09-13-2005, 12:42 AM
Marco van Herwaarden Although this is a nice and... 09-13-2005, 03:47 AM
Andreas Honestly, class_core.php is... 09-13-2005, 03:50 AM
Boofo Well, since I only have 3 of... 09-13-2005, 04:09 AM
merk I am using one extra query to... 09-13-2005, 11:15 PM
Andreas Here is another approach.
... 09-14-2005, 02:13 AM
Brad Thanks kirby, I'll give this... 09-14-2005, 02:24 AM
Marco van Herwaarden Will have a look also today i... 09-14-2005, 02:48 AM
merk Well done kirby, thats... 09-14-2005, 03:59 AM
Andreas *bump*
Anyone except merk... 09-18-2005, 01:19 AM
Zachariah Never !!! .... I got a hack I... 09-18-2005, 01:51 AM
merk I hope Jelsoft have an eye on... 09-18-2005, 02:39 AM
Marco van Herwaarden Sorry Kirby, i have my hands... 09-18-2005, 05:01 AM
Zachariah Bump - I forgot about this,... 03-30-2006, 12:32 AM
Code Monkey Anyone still messing with... 01-11-2007, 04:37 PM
thincom2000 Did this NOT get added when... 01-22-2007, 08:41 PM
patrickb Has there been any updates on... 08-21-2007, 07:45 AM
Marco van Herwaarden This has been addressed in... 08-21-2007, 08:07 AM
|
#1
|
|||
|
|||
CODERS PLEASE DISCUSS!!! Pre-Datastore modifications with XML-files (UPDATE 28-7)
Coding in this thread should be considered a Proof of Concept, not to be used outside testboards!!!!!
Alternative 2 presented Ok now i have got your attention, please read the following. I really want this to become a combined effort of the vbulletin.org community. If we can pull this of in a good way we could try to either convince Jelsoft that this should be standard (i doubt they will do this in 3.5, but worth a try), or we could use it as a standard extension that can be used by many coders. Or everybody will just shoot me for this idea. We got all these nice plugins etc, but there is still something that can not be done without file edits: Adding datastore items ($specialtemplates) Before it also seemed impossible to touch prefetching templates ($globaltemplates & $actiontemplates) or new Phrasegroups ($phrasegroups), although i think most of these could be done with a plugin nowadays The datastore seems untouchable because it gets loaded before the plugin system gets active. Alternative 1 See file: Pre-Datastore using XML-files - v1.00.zip I made 1 modification to ./includes/init.php that could solve this problem. What it does is give you the chance to create a XML-file for your hack that will be loaded before the datastore gets build. To use this a 1 time modfication to init.php would be needed (unless Jelsoft wants to use it in the standard product), that could be shared by all hacks. It let's you add in a controled way entries to the following vars: - $phrasegroups - $specialtemplates - $globaltemplates - $actiontemplates (not working in this version, would have to do some small changes for it) I have been testing it on my localhost and it doesn't add much to the pageloads (important, it would be executed on each page load). Please all coders have a look at this modification and give feedback (positive/negative or improvements) In ./includes/init.php find: PHP Code:
PHP Code:
That is all. How to use this? As said before you can now use a XML-file uploaded to the ./includes/xml' directory to control things. XML-File naming: ./includes/xml/preds_<productid>.xml Replace the <productid> preferable with the productid you assigned to your hack, but any other unique name should also work. Now the content of the file: HTML Code:
<?xml version="1.0" encoding="ISO-8859-1"?> <predsgroups product="productid"> <predsgroup script="global" vb_area="AdminCP"> <phrasegroups>phrasegroup</phrasegroups> <specialtemplates>datastoreitem</specialtemplates> <globaltemplates>globaltemplate</globaltemplates> <actiontemplates>actiontemplate</actiontemplates> </predsgroup> <predsgroup script="showthread" vb_area="Forum"> <phrasegroups>phrasegroup</phrasegroups> <specialtemplates>datastoreitem</specialtemplates> <globaltemplates>globaltemplate</globaltemplates> <actiontemplates>actiontemplate</actiontemplates> </predsgroup> </predsgroups> - You must set a product! (if your product is not enabled, code will not run from this file. - script must contain the name of the file for which this group should be loaded, or 'global' to always load. - vb_area MUST be set. Default vB has 1 areas 'Forum' and 'AdminCP' - You can have as many predsgroup's as you need. - Within each group you can have as many lines as you need. Only the above tags are supported, all other will be ignored. Please all have a look at this 'proof of concept' and give feedback. If we think this would be a nice way of standarization with only once a code edit (unless.....) then i will release this to use for all hacks released here on vb.org, if the coder wants to use it. Alternative 2 See for details file: Proof of Concept Pre-Datastore for plugins - Alternative 2 Version 1.00.zip Description: Proof of Concept Pre-Datastore for plugins - Alternative 2 Version 1.00 This code is part of a proof of concept discussion at vbulletin.org. Goal of this discussion is to create a way to add new datastore items in hacks without having to modify source code for each hack. Unless Jelsoft decide to incorporate one of the presented alternatives this goal will never be met. At least there would be needed a one time code modification for all hacks: Thread: https://vborg.vbsupport.ru/showthread.php?t=93007 Author: MarcoH64 This code might NOT be used as a whole or a part without authors permission. *** THIS CODE IS STRICTLY TO BE USED FOR CONCEPTUAL TESTING, AND NOT TO BE USED OUTSIDE A TESTBOARD *** ================================================== ================================================== = Alternative 2: Add a new table that will store information of datastore items needed for any script. Merge the info of that table with the standard vB datastore items that are retrieved in unmodified code. The idea of this alternative was presented by different members on vb.org and vb.com. Pro in this solution: - No need to parse XML-files for each pageload (compaired to Alternative 1) - Should probably be faster because of this. - Table can be loaded together with the default Product XML-file Con's in this alternative: - Will also execute if Plugin System is globally disabled (chicken and egg problem, or extra queries needed) - A lot more file modifications needed - Script to maintain the information stored in the table not written (yet?). Should anyway only be available in debug mode? - Need to create a new table - Query to use when loading the datastore on each page load might be slowed down considerably. This should be tested in a representable environment. Same goes for alternative 1. - This alternative only handles new datastore items, not template caching like alternative 1 |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|