vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=235)
-   -   Mini Mods - Update: Default Pre-selected Post Icon: Now from Parent ID (https://vborg.vbsupport.ru/showthread.php?t=256925)

jim doodle 01-10-2011 10:00 PM

Update: Default Pre-selected Post Icon: Now from Parent ID
 
1 Attachment(s)
This is just a little update for the Default Pre-selected Post Icon

Works in 3.8.6

It's been a while since any one used this mod by the looks of things, I've updated it a little to work with multiple forums where adding each forum as a separate 'If' statement is unthinkable.

Instead i've exploded the string of parantlist which contains a strong of parent forum IDs into an array, and made a conditional from there:

PHP Code:

$newparentarrayexplode(','$foruminfo[parentlist]);

if (
in_array(146$newparentarray)) {
    
$newpost['iconid'] = '18'
}
else if (
in_array(147$newparentarray)) {
    
$newpost['iconid'] = '19'


And a little edit on the hook location it is "newthread_form_start" not forum.

piratarg 10-18-2012 09:14 PM

Very thanks! I was looking for something like this.

Is it possible to select more forums? Example:

PHP Code:

$newparentarrayexplode(','$foruminfo[parentlist]);

if (
in_array(1,2,5,8$newparentarray)) {
    
$newpost['iconid'] = '4'
}
else if (
in_array(12,14,16$newparentarray)) {
    
$newpost['iconid'] = '6'



piratarg 10-20-2012 01:33 AM

Does not work, any suggestions? Help please!

stefan-baldes 10-23-2021 02:17 PM

Is there a chance to get the original addon? Since the associated thread has been archived dowinloading it is not possible anymore.


All times are GMT. The time now is 12:54 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
  • Page Generation 0.03640 seconds
  • Memory Usage 1,720KB
  • 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
  • (2)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete