SimplePortal
Support => English Support => Topic started by: curlin on January 14, 2010, 12:29:57 PM
-
Hi
Have set up a poll which shows fine in a block and clicking on the view topic link in the block also works. But clicking "Submit Vote" leads to just a blank, white screen. I've loaded up a fresh SSI.php file via ftp but no change. Some help please and thank you.
Using latest versions of smf and sp.
-
bump
-
Anyone :0
bump
-
Seems to work fine for me. SSI.php shouldn't matter.
Any chance you can link me to where this is happening?
-
Yes but my site isn't 100% finished so could i pm it to you?
-
You can pm it to me.
-
well, it won't let me send a pm for some reason so here is the site - http://www.tbredjkie.byethost15.com
Having trouble with the right side blocks
Latest member block - doesn't show avatars
Poll block - can't vote - leads to white screen
last 3 blocks - title text has black color when the text should be white like the rest.
-
Latest member block is not supposed to show avatars when you have it configured to show more than one.
The poll block apparently relies on SSI.php-- and your SSI.php is not loading properly. Refer to:
http://www.tbredjkie.byethost15.com/ssi_examples.php
http://www.tbredjkie.byethost15.com/SSI.php
All of them result in blank screen. Please ensure those files are fresh.
I'd wager a guess that the last issue is because of a clear or something resetting the class rule... that may or may not be a bug. Try playing around with how you put the blocks out.
-
Thank You ccb
I'll look at that tomorrow.
-
Latest member block is not supposed to show avatars when you have it configured to show more than one.
Ok - just starting to look at these issues now and this one - latest member- still is not working. I re-checked to make sure it is set to show only "1'. I even deleted the block and created a new one but still the same result.
-
It doesn't display avatar of latest member(s) since 2.2. It did in older versions though.
-
It doesn't display avatar of latest member(s) since 2.2. It did in older versions though.
Oh
Is there something i can add so it does?
-
Latest member block is not supposed to show avatars when you have it configured to show more than one.
The poll block apparently relies on SSI.php-- and your SSI.php is not loading properly. Refer to:
http://www.tbredjkie.byethost15.com/ssi_examples.php
http://www.tbredjkie.byethost15.com/SSI.php
All of them result in blank screen. Please ensure those files are fresh.
I'd wager a guess that the last issue is because of a clear or something resetting the class rule... that may or may not be a bug. Try playing around with how you put the blocks out.
I uploaded fresh copies of those 2 files but still no change. I noticed i also have this SSI.php~
-
Oh
Is there something i can add so it does?
You can use this code in a Custom PHP block:
global $context, $memberContext, $modSettings, $color_profile;
$latest_member_id = $context['common_stats']['latest_member']['id'];
loadMemberData($latest_member_id);
loadMemberContext($latest_member_id);
echo '
<div style="text-align: center;">';
if (!empty($memberContext[$latest_member_id]['avatar']['href']))
echo '
<img src="'.$memberContext[$latest_member_id]['avatar']['href'].'" alt="" width="60" /><br />';
echo '
', $memberContext[$latest_member_id]['link'], '
</div>';
I uploaded fresh copies of those 2 files but still no change. I noticed i also have this SSI.php~
I would suggest seeking help on that issue at simplemachines.org communtiy. That issue is beyond the scope of this mod. Once you get SSI.php file working fine, poll block should work fine as well.
-
Ok - i will. Thanks again.
-
Thanks for the latest member code - works great ;D
However - the ball has been served back into your court - http://www.simplemachines.org/community/index.php?topic=361649.0
-
I have replied to that topic.
-
I have replied to that topic.
:applause:
And you look quite abit different over there :P
-
Ok - so this block won't fully function for me so i would like to set it up to only show the results of the on going poll. I looked in the poll options but don't see how to set it this way. Is there something i can change in the poll block code to do this?
Thanks
-
Anyone :0
I'd like to keep this block for viewing poll results but if i can't set it up that way, unfortunately i'll have to remove it.
-
If it cannot be done then just say so and i'll have to remove it :(
-
:applause:
And you look quite abit different over there :P
Different, you mean?
Ok - so this block won't fully function for me so i would like to set it up to only show the results of the on going poll. I looked in the poll options but don't see how to set it this way. Is there something i can change in the poll block code to do this?
Thanks
Does SSI.php and ssi_examples.php files fully function?
If it cannot be done then just say so and i'll have to remove it :(
If you want, you can provide me a temporary FTP and admin access to your forum and I'll check it out for you.
-
For some reason SSI.php still didn't work. So I modified poll block to use ?action=vote instead of SSI pollVote.
Reason for some blocks having black titles was a <font> tag left open in the custom articles block.
Menu block was screwed when hovered on some items, because it had sp_block class assigned to body which has an overflow. I just removed it from menu block.
So I guess issues are fixed so marking the topic as solved.
-
Yes, and again Thank You ;D
-
Oh
Is there something i can add so it does?
You can use this code in a Custom PHP block:
global $context, $memberContext, $modSettings, $color_profile;
$latest_member_id = $context['common_stats']['latest_member']['id'];
loadMemberData($latest_member_id);
loadMemberContext($latest_member_id);
echo '
<div style="text-align: center;">';
if (!empty($memberContext[$latest_member_id]['avatar']['href']))
echo '
<img src="'.$memberContext[$latest_member_id]['avatar']['href'].'" alt="" width="60" /><br />';
echo '
', $memberContext[$latest_member_id]['link'], '
</div>';
I uploaded fresh copies of those 2 files but still no change. I noticed i also have this SSI.php~
I would suggest seeking help on that issue at simplemachines.org communtiy. That issue is beyond the scope of this mod. Once you get SSI.php file working fine, poll block should work fine as well.
Hi SiNaN
I used the code below to add a default avatar to those that don't select one and it shows in the posts but not in the newest member block you setup for me with this code. Could you tell me what i need to add for the default avatar to show in the newest member block?
Thank You
// Default avatar. ^^
if (empty($memberContext[$user]['avatar']['image']))
$memberContext[$user]['avatar']['image'] = '<img src="' . $settings['images_url'] . '/default_avatar.png" alt="Default Avatar" title="Default Avatar" width="' . $avatar_width . '" height="' . $avatar_height . '" />';
// First do a quick run through to make sure there is something to be shown.
$memberContext[$user]['has_messenger'] = false;
-
Hi SiNaN
I used the code below to add a default avatar to those that don't select one and it shows in the posts but not in the newest member block you setup for me with this code. Could you tell me what i need to add for the default avatar to show in the newest member block?
Thank You
// Default avatar. ^^
if (empty($memberContext[$user]['avatar']['image']))
$memberContext[$user]['avatar']['image'] = '<img src="' . $settings['images_url'] . '/default_avatar.png" alt="Default Avatar" title="Default Avatar" width="' . $avatar_width . '" height="' . $avatar_height . '" />';
// First do a quick run through to make sure there is something to be shown.
$memberContext[$user]['has_messenger'] = false;
Using FTP navigate to this file:
/ Sources / PortalBlocks.php
Find:
function sp_userInfo($parameters, $id, $return_parameters = false)
{
global $context, $txt, $scripturl, $memberContext, $modSettings, $user_info, $color_profile;
Replace with:
function sp_userInfo($parameters, $id, $return_parameters = false)
{
global $context, $txt, $scripturl, $memberContext, $modSettings, $user_info, $color_profile, $boardurl;
<<<>>>
Within the same function, find:
if (!empty($member_info['avatar']['image']))
echo '
', $member_info['avatar']['image'], '<br /><br />';
Add the following BEFORE the above code:
if (empty($member_info['avatar']['image']))
{
$member_info['avatar']['image'] = '<img src="' . $boardurl.'/Themes/default/images/default_avatar.png" alt="Default Avatar" title="Default Avatar" width="90" height="90" />';
}
<<<<<<<<<<>>>>>>>>>>
Change the dimensions of the avatar to what you want within the above edit. The image must be named:
... and must be placed in your / Themes / default / images folder.
UD
-
You could just make it an inline check
Eg, instead of:
if (!empty($member_info['avatar']['image']))
echo '
', $member_info['avatar']['image'], '<br /><br />';
You'd have:
echo (!empty($member_info['avatar']['image']) ? $member_info['avatar']['image'] : '<img src="' . $settings['default_images_url'] . '/default_avatar.png" alt="Default Avatar" title="Default Avatar" width="90" height="90" />'), '<br /><br />';
In addition, you don't need to add the $boardurl global in my case either. You would need to add $settings however.
-
Did the suggested solutions above helped, curlin?
-
Did the suggested solutions above helped, curlin?
Yes, works fine now :)
-
For some reason SSI.php still didn't work. So I modified poll block to use ?action=vote instead of SSI pollVote.
sorry to bump this but a spanish user is having the exact same error with a poll block it goes to SSI.php?ssi_function=pollVote and gives a 500 error even in the ssi_examples.php so I was wondering how do you chage the SSI.php?ssi_function=pollVote for action=vote;topic=x;poll=x; ?