PDA

View Full Version : Suggestion: User Option On Filtering Of Latest Mods


sabret00the
05-21-2006, 12:31 PM
I'd like to suggest being able to filter out styles/template mods on the latest mods list on the portal.

Chris M
05-21-2006, 01:18 PM
So are you suggesting it or just thinking about suggesting it? :p

Chris

Marco van Herwaarden
05-21-2006, 01:36 PM
Or different categories, or maybe a filter, sounds like a good idea. Maybe it can be done while we upgrade vb.org

Xenon
05-21-2006, 07:17 PM
hmm, that would make a need to rewrite the whole system on that part. as the values are cached right now...

hmm, maybe later :)

sabret00the
05-21-2006, 11:39 PM
hmm, that would make a need to rewrite the whole system on that part. as the values are cached right now...

hmm, maybe later :)
you can still cache it.

make an array of 20 latest mods, 10 styles, 10 hacks, then serialize that.

then in real time, loop through that array to give you the ten latest results, if you got the filter, you ignore the styles if not then you include them. it's still the same amount of queries as before, just like 10 extra lines of code max. :)

Xenon
05-22-2006, 12:38 PM
yes i know ;)

we ahve plans to change the portal at all a bit more, so this should be done then as well :)

sabret00the
05-22-2006, 01:30 PM
yes i know ;)

we ahve plans to change the portal at all a bit more, so this should be done then as well :)
good news, i thought i was gonna have to whip out the code for you :p

Xenon
05-22-2006, 02:46 PM
if that will happen one day, i think i will give up the job as coding team leader and take over the 'i got old team'

Revan
05-22-2006, 03:36 PM
you can still cache it.

make an array of 20 latest mods, 10 styles, 10 hacks, then serialize that.

then in real time, loop through that array to give you the ten latest results, if you got the filter, you ignore the styles if not then you include them. it's still the same amount of queries as before, just like 10 extra lines of code max. :)Or index the array differently, have a deep array with hacks and styles as master array indexers then autonumber within those arrays.
For all the sense that made.
I don't see how it would require more than a rewrite of the line that makes the cache array, as that could check parent forum ID.

*ahem*

sabret00the
05-22-2006, 07:53 PM
i was thinking

$array = array($hackid => array($hackid, $hacktitle, $hackforumid, $hackthreadid));
$newarr = '';

foreach ($array AS $k)
{
$check = $vbulletin->userinfo['fieldX'];
if (isset($check))
{
$newarr .= ($k[hackforumid] != $check) ? "<li>" . eval(fetch_template('portal_latesthacks')) . "</li>" : '';
}
}


something like that.

COBRAws
05-23-2006, 08:58 PM
Good suggestion. Personally, I dont like styles showing as hacks in the portal "new hacks" block.
I can use the search.php and restrict all forums but the plugins and hacks, but... well, its just a suggestion as sabret00the did :P

Xenon
05-24-2006, 11:31 AM
afaicr it is called latest releases and therefor style can be there as well ;)

Logikos
05-26-2006, 11:46 AM
if that will happen one day, i think i will give up the job as coding team leader and take over the 'i got old team'

If that happens, then you would still be stuck with Bob, though he would be your leader this time. :p