Fork me on GitHub

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Try Vanilla Forums Cloud product

In this Discussion

Ready to contribute?

Amazing! Sign our contributors' agreement and then join us on GitHub.

Current release is 2.1.6 (21 Nov 2014).

Users who have not yet upgraded to 2.1 should get security release 2.0.18.14 (1 Nov 2014). We will stop providing these security releases to 2.0 at the end of this year.

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.