PDA

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


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

Chris M
21 May 2006, 14:18
So are you suggesting it or just thinking about suggesting it? :p

Chris

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

Xenon
21 May 2006, 20:17
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
22 May 2006, 00:39
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
22 May 2006, 13:38
yes i know ;)

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

sabret00the
22 May 2006, 14:30
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
22 May 2006, 15:46
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
22 May 2006, 16:36
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
22 May 2006, 20:53
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
23 May 2006, 21:58
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
24 May 2006, 12:31
afaicr it is called latest releases and therefor style can be there as well ;)

Logikos
26 May 2006, 12:46
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