![]() |
[SURVEY]Would You prefer a hack with or without files modifications ?
Hi everybody
I'm doing a new hack (PYNFATYF Hack) but I'm in front of a big problem ... You probably know that now, with vb 3.5 you can add hacks to your forum without modifying at all any file, just upload at least one file, import a XML and you're done So, it's really easier to upgrade your forum, it's faster to install :bandit: But I'd like to know what people really think about it ... Would you prefer a hack (a big hack) with file modifications to try decreasing the number of queries that this hack adds, or would you prefer a hack without files modifications at all, so, easy and fast to install (even when you upgrade your board) I'm waiting for your answers :) |
I prefer edit-free Hacks that don't add overhead :)
In (rare) cases where this is not possible, one must decide if the overhead is worth it or not. If it happens often (eg. forumdisplay, showthread, etc): Move on and edit the file. If it is seldom (for example when the user updates his profile or smth.), introduce a new query. |
Andrea I'm sure you know that sometimes we have no choice and we need to get back some new datas ... and so we need new queries ... or try modifying an existing query to get these datas through an existing query (even it slows down the forum too ...) ;)
Ok for the edit ;) In my case, it concerns showthread and even if I can modify an existing query, I'm sure it would reduce the load time, so what to do ? :ermm: |
What exactly would be your file edit?
|
What is PYNFATYF ?
Anyway, an extra query or two is generally neither here nor there, people worry too much about them. The one hack I have left to release requires a query and a bit of code to be duplicated because of the location of the hooks, but that's life. :) |
I don't exactly know for now, but I need to get back datas from a new table (SELECT * if I use hooks, if I modify the file, I'll have to linked some tables in an existing query) in showthread
And surely an other one to get back a new field I should have to add to the attachment table (for this one it's better to modify the existing query I think) |
Personally, I would rather have the file edits and have the code more optimized. So many users are on shared servers with limited resources, which makes optimization key.
Amy |
Paul : PYNFATYF is for Personalize Your Newthread Form According To Your Forum
|
The two most important queries in showthrad.php (to get the IDs and the actual posts) can be modified without editing the files.
|
Quote:
|
Hooks showthread_query_postids and showthread_query
|
But how can I modify this query with the hook ?
If I add a query to this hook, it's the same thing that if I added it to the file ? How could I modify the query in the file ? I don't understand ... |
It allows you to add extra columns to the query without adding a new query.
|
An example amy ? :)
You're interesting me ! |
You can use the variables $hook_query_fields to add new fields, $hook_query_joins to add joins and $hook_query_where to add conditions.
Example PHP Code:
|
Thanks Andreas :)
Can this (by replacing variable's name) be done in every hook ? How could I have known it if you had not said it to me ? Isn't there a guide "the perferct vbulletin hacker's guide ?" ;) |
No, only in special query Hooks.
Well, you could just take a look at the source files - they are fully documented and the query Hooks as well as the variables are clearly visible there ;) |
OK, thank you
Other replies for the survey now, else my thread will be moved to an other forum ... :p |
All times are GMT. The time now is 04:43 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|