Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Closed Thread
 
Thread Tools Display Modes
  #31  
Old 08-05-2005, 08:52 PM
Link14716's Avatar
Link14716 Link14716 is offline
 
Join Date: Jun 2002
Location: Georgia, USA
Posts: 2,519
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
  #32  
Old 08-05-2005, 08:57 PM
Revan's Avatar
Revan Revan is offline
 
Join Date: Jan 2004
Location: Norway
Posts: 1,671
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
  #33  
Old 08-06-2005, 01:44 AM
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Posts: 7,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
  #34  
Old 08-06-2005, 05:45 AM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
  #35  
Old 08-06-2005, 10:27 AM
Revan's Avatar
Revan Revan is offline
 
Join Date: Jan 2004
Location: Norway
Posts: 1,671
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
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*).
  #36  
Old 08-06-2005, 11:06 AM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
  #37  
Old 08-06-2005, 12:32 PM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

@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.
  #38  
Old 08-06-2005, 05:12 PM
Revan's Avatar
Revan Revan is offline
 
Join Date: Jan 2004
Location: Norway
Posts: 1,671
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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...
  #39  
Old 08-06-2005, 06:19 PM
amykhar's Avatar
amykhar amykhar is offline
 
Join Date: Oct 2001
Location: PA
Posts: 4,438
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
How can I make a custom class recognise custom DS items then?
Easy require the special templates.
  #40  
Old 08-06-2005, 07:20 PM
Revan's Avatar
Revan Revan is offline
 
Join Date: Jan 2004
Location: Norway
Posts: 1,671
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Eh? Gonna need abit more detail than that, girl
Closed Thread


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 05:16 PM.


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.08867 seconds
  • Memory Usage 2,281KB
  • Queries Executed 12 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (7)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete