How to Change Polls Block's Default Tab

noman posted 9th of May 2008 in Community Voice. 9 comments.
Hi there,

I'm running Dolphin 6.0.0005 and would like to know how to change the default tab that shows up in the Polls block on the main page. Right now, it defaults to displaying the Latest tab, but I would like to have it default to the Admin tab. Or, if that is not possible, at least have the latest Admin poll displayed under the Latest tab (though that seems to be for profile polls only....)

:)


 
Comments
·Oldest
·Top
Please login to post a comment.
zaestar
Hello noman,

I am looking to do the exact same thing.
johno
Yep me too, but running 6.1.
zaestar
I should have noted that I am running 6.1 as well. I tried looking through the source code but to no avail.
okweb
Change Polls Block's Default Tab to Admin,

Dol Ver 6.005
Open file: templates/tmpl_uni/scripts/index.php

Find:
function PageCompProfilePollContent($sCaption)

And edit,
$mode = strlen($_GET['ppoll_mode']) ? $_GET['ppoll_mode'] : 'last';

To,
$mode = strlen($_GET['ppoll_mode']) ? $_GET['ppoll_mode'] : 'admin';

----------------------------------------------------------------------------
Dol Ver.6.1

Open file: templates/base/scripts/BxBaseIndex.php

Find: function getBlockCode_ProfilePoll()

And see more edit,
$mode = strlen($_GET['ppoll_mode']) ? $_GET['ppoll_mode'] : 'last';

To:
$mode = strlen($_GET['ppoll_mode']) ? $_GET['ppoll_mode'] : 'admin';


best of luck!!
okweb
You have do this also, because lose of database array.

Dol Ver.6.1
Move this code:
if( $mode == 'admin' )
$ret = $this->getBlockCode_SitePolls();
else {
$ret = '';

Bellow this line:
$sPic = get_member_icon( $poll_arr['ID'], 'left');
$sPoll = ShowPoll( $poll_arr['id_poll'] );

-------------------------------------------------------

Dol Ver 6.0.0005
Move this code:
if( $mode == 'admin' )
{
$ret = PageCompSitePolls();
}
else
{
$ret = '';

Bellow this line:
$NickName see more = "<b><a href=\"".getProfileLink($poll_arr['ID'])."\">{$poll_arr['NickName']}</a></b>";

Have no install with 6.0.0005, so this are not tested, but I think it will work.
zaestar
Thanks, okweb, these changes worked like a charm.

Cheers.
rogerbr9999
Thanks to okweb.

Solve my problem too ...
noman
The first part worked like a charm! Thanks!
fobicodam
mmm sorry, 6.1.14 here, there is no index.php there..
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.
PET:0.16244983673096