HomeUnityBlogs
 
 
noman

How to Change Polls Block's Default Tab

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....)

:)


bad
1
good
 
 

Comments

zaestar
zaestar 55 days agocomment permalink
 
Hello noman,

I am looking to do the exact same thing.
 
bad
0
good
 
 
johno
johno 54 days agocomment permalink
 
Yep me too, but running 6.1.
 
bad
0
good
 
 
zaestar
zaestar 54 days agocomment permalink
 
I should have noted that I am running 6.1 as well. I tried looking through the source code but to no avail.
 
bad
0
good
 
 
okweb
okweb 54 days agocomment permalink
 
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 edit,
$mode = strlen($_GET['ppoll_mode']) ? $_GET['ppoll_mode'] : 'last';

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


best of luck!!
 
bad
0
good
 
 
okweb
okweb 54 days agocomment permalink
 
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 = "<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.
 
bad
0
good
 
 
zaestar
zaestar 54 days agocomment permalink
 
Thanks, okweb, these changes worked like a charm.

Cheers.
 
bad
0
good
 
 
rogerbr9999
rogerbr9999 53 days agocomment permalink
 
Thanks to okweb.

Solve my problem too ...
 
bad
0
good
 
 
noman
noman 52 days agocomment permalink
 
The first part worked like a charm! Thanks!
 
bad
0
good
 
 


Post a Comment

Please login to post a comment.

This Post
 
 
noman Blog
All Blogs
Found a bug? Have a suggestion? We really value your feedback!
 
© 2008 BoonEx Ltd
ABN 27 127 966 581
 
PET:0.639870882034