Fork me on GitHub
Current releases are 2.1.3 (9 Sept 2014) and 2.0.18.13 (5 Aug 2014)

Ready for 2.1? Find out if your favorite plugins are compatible. The 2.0 branch will no longer receive updates after Dec 2014.

Changing place of TopPosters???

ntuyelikntuyelik New
edited March 2011 in Vanilla 2.0 Help
This discussion is related to the TopPosters addon.
How can I put Top Posters section over the tags section on side panel?

Comments

  • AoleeAolee Hobbyist & Coder ✭✭
    edited March 2011
    How can I put Top Posters section over the tags section on side panel?
    hi ntuyelik,

    im not sure of the proper way to re-arrange it but i was able to devise a workaround


    add this on default.php at line 70

    $Sender->AddModule($TopPostersModule);//add code below after this line

    //array_keys($Sender->Assets['Panel']); //list of modules processed before Top Posters
    $i = 0;
    foreach($Sender->Assets['Panel'] as $k => $val){
    //'string' gotten from the array_keys
    if($k == 'TagModule') break;
    $i++;
    }
    $last['TopPostersModule'] = array_pop($Sender->Assets['Panel']);
    array_splice($Sender->Assets['Panel'],$i,0,$last);




    code picks up the index position of the TagModule and uses it in array_splice -- inserting the "pop-ed" Top Poster Array value
Sign In or Register to comment.