vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   CODERS PLEASE DISCUSS!!! Pre-Datastore modifications with XML-files (UPDATE 28-7) (https://vborg.vbsupport.ru/showthread.php?t=93007)

Link14716 08-05-2005 07:52 PM

The problem is then you have to CHMOD to install plugins.

I still say the new table/query modification is the best for datastore, and hooks can take care or everything else.

Revan 08-05-2005 07:57 PM

So what if you have to CHMOD 1 file once?
You don't have to CHMOD the current datastore_cache every time you rebuild the vBOptions if you use the flatfile method, do you?
And even IF you would have to, it's still more efficient than adding queries or doing advanced parsing.

Erwin 08-06-2005 12:44 AM

Quote:

Originally Posted by Revan
So what if you have to CHMOD 1 file once?
You don't have to CHMOD the current datastore_cache every time you rebuild the vBOptions if you use the flatfile method, do you?
And even IF you would have to, it's still more efficient than adding queries or doing advanced parsing.

That's what I've done in the past on my site. It does work. But would defeat the purpose of the concept of plugins.

Marco van Herwaarden 08-06-2005 04:45 AM

Nice to see there is some life in this topic again.

Let me just try to get the original problem clear again:
- You can do a lot without code changes with 3.5, there is however 1 thing you can not: If your hack adds a new entry to the datastore, you will have to edit each file to add your datastore item to the list of items to be fetched. You can not use hooks, because they are only loaded after the datastore is read.
- If we can easily without extra effort also add a simple way to do the same for template caching, then do so. It would reduce the number of plugins needed for your hack.

The original idea was to come with a solution that Jelsoft even might consider implementing, but since we are already on RC2, i doubt that will happen. Second best would be a standarized way of handling this as a community, so that whatever hack you use, file edits would only have to be made once.

Revan 08-06-2005 09:27 AM

Quote:

Originally Posted by Erwin
That's what I've done in the past on my site. It does work. But would defeat the purpose of the concept of plugins.

How does it defeat the purpose of the concept of plugins?
If the hack is extensive enough to require datastore plugging into, it will also require file upload, so CHMODding a file wouldn't be hassle.
I don't really know, so DO you have to re-CHMOD the datastore_cache.php each time you update vBOptions?
If you don't, I don't see any reason why this should be any different.

Quote:

Originally Posted by MarcoH64
Nice to see there is some life in this topic again.

Let me just try to get the original problem clear again:
- You can do a lot without code changes with 3.5, there is however 1 thing you can not: If your hack adds a new entry to the datastore, you will have to edit each file to add your datastore item to the list of items to be fetched. You can not use hooks, because they are only loaded after the datastore is read.
- If we can easily without extra effort also add a simple way to do the same for template caching, then do so. It would reduce the number of plugins needed for your hack.

The original idea was to come with a solution that Jelsoft even might consider implementing, but since we are already on RC2, i doubt that will happen. Second best would be a standarized way of handling this as a community, so that whatever hack you use, file edits would only have to be made once.

If I had known this would concern me I would have replied earlier, XD
For my RPG I require a cache, but I just created my own table (rpg_cache, datastore table duplicate) and query this whenever I call $RPG->init(). I never really wanted to plug into the datastore table, because I wanted my variables to be $RPG->item not $vbulletin->item without too much hassle :p
Im not saying this to say "that's the solution", fyi.

The easiest solution would just be to hassle Jelsoft into adding a hook or two to enable us to do what we are trying to do.
If we have to come up with an uniform way of doing this, however, I believe my suggestion's downsides are far smaller than the disadvantages of adding an extra query to pages who won't even need this new field, and parsing the XML file on the fly (Imagine what would happen if the user has 15 hacks that require datastore modification, *shudders*).

Marco van Herwaarden 08-06-2005 10:06 AM

This is why i opened the discussion, to find the best together. Your way of adding your own table for the rpg hack works, but will add another query also. If many hacks do this, this will mean many queries. And using custom datastore items in your own new script is not a problem. It is using them in plugins into jelsoft scripts that require code edits.

Andreas 08-06-2005 11:32 AM

@Revan
Not every Hack that does require a DS item necessarily has to come with it's own Files.
Furthermore, it's impossible to intruduce Hooks to handle the Datastore Problem, as Plugins itself are being loaded from the Datastore.
My idea does not introduce a new Query, it just changes an existing one to have a JOIN and 1 more Condition.
As the Tables that would be used are pretty small, this should hardly cause any Overhead.

The idea of keeping a var_dump()ed array in a File is also nice, as it does not cause parsing or Query Overhead.
vBulletin itself does so, if you use the Class for a File-Based Datastore, so I think the CHMOD issue isn't a big one, as this would have to be done only once.
Hmm, Safe Mode and open_basedir restrictions could cause Problems here though.

Revan 08-06-2005 04:12 PM

Quote:

Originally Posted by MarcoH64
This is why i opened the discussion, to find the best together. Your way of adding your own table for the rpg hack works, but will add another query also. If many hacks do this, this will mean many queries. And using custom datastore items in your own new script is not a problem. It is using them in plugins into jelsoft scripts that require code edits.

How can I make a custom class recognise custom DS items then?
Quote:

Originally Posted by KirbyDE
@Revan
Not every Hack that does require a DS item necessarily has to come with it's own Files.
Furthermore, it's impossible to intruduce Hooks to handle the Datastore Problem, as Plugins itself are being loaded from the Datastore.

Oh XD
Quote:

Originally Posted by KirbyDE
The idea of keeping a var_dump()ed array in a File is also nice, as it does not cause parsing or Query Overhead.
vBulletin itself does so, if you use the Class for a File-Based Datastore, so I think the CHMOD issue isn't a big one, as this would have to be done only once.
Hmm, Safe Mode and open_basedir restrictions could cause Problems here though.

How so? After all, this file could be stored in the same way as the current ds cache file, which obviously work with Safe Mode and open_basedir...

amykhar 08-06-2005 05:19 PM

Quote:

How can I make a custom class recognise custom DS items then?
Easy require the special templates.

Revan 08-06-2005 06:20 PM

Eh? Gonna need abit more detail than that, girl :p


All times are GMT. The time now is 02:54 AM.

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.01765 seconds
  • Memory Usage 1,749KB
  • 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
  • (7)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)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