Daily Lucky Numbers:
4
18
24
31
35
45

Battle v1.15 Beta Releases

Started by Chen Zhen, January 31, 2014, 10:12:44 PM

Previous topic - Next topic

Burt

#30
Quote from: underdog on February 14, 2014, 06:35:38 PM

! fixed user avatar in Battle template


Hello Underdog....

Few of my members avatar are still not loading.. I have tried to edit the Battle.template.php to see if I could do some changes but none of the programs I'm using is good enough for editing your .php files... or maybe is Filezilla that does change something...

They alway return the error

Parse error: syntax error, unexpected T_FUNCTION in /home/ilmozzon/public_html/forum/Themes/default/Battle.template.php on line 1

I forgot

Just to be clear. The avatar does load in the main "home" screen above the Welcome warriors.....

Where it doesn't load is in the battle screen where you get a straight vertical line only.

Burt

Chen Zhen

Burt,

  You are looking at the correction I made but it is for the main battle page where you say it works fine.
The display you are referring to is in a different part of the file which I did not know had an issue until now.

Let me explain something in response to your last post to thwart your confusion.

This code:

if (!empty($context['user']['avatar']))
      echo '
            <p class="avatar">', $context['user']['avatar']['image'], '</p>';

.. asks the condition that if the user has an avatar, display it (partially using theme css).

this code:

else
      echo '
            <img border="0" src="', $settings['images_url'], '/icons/online.gif" width="50" height="50" alt="', $user_info['name'], '" />';

... only kicks in if the previous was not true (user does not have an avatar selected) whereas it will display a default user image.
If you are saying that different themes use various image types for the default user icon, I can simply have it display an image that can be included in the battle package.




  The image that is displayed for user battles is located in a different part of the template file. It needs to be edited to be the same as what was referenced here to fix it which is something I overlooked. I will fix this for the next beta release.

Thank you for the report.

Fog

I'm not a genius on this but where you have it highlighted in red can one insert

'icons/online.gif"

or

'foldername/icons/online.gif"

don't be afraid to insert the whole url.

The "/" might be the issue too

Fog


Burt

Quote from: underdog on February 15, 2014, 12:14:24 AM
Burt,

  You are looking at the correction I made but it is for the main battle page where you say it works fine.
The display you are referring to is in a different part of the file which I did not know had an issue until now.

Let me explain something in response to your last post to thwart your confusion.

This code:

if (!empty($context['user']['avatar']))
      echo '
            <p class="avatar">', $context['user']['avatar']['image'], '</p>';

.. asks the condition that if the user has an avatar, display it (partially using theme css).

this code:

else
      echo '
            <img border="0" src="', $settings['images_url'], '/icons/online.gif" width="50" height="50" alt="', $user_info['name'], '" />';

... only kicks in if the previous was not true (user does not have an avatar selected) whereas it will display a default user image.
If you are saying that different themes use various image types for the default user icon, I can simply have it display an image that can be included in the battle package.




  The image that is displayed for user battles is located in a different part of the template file. It needs to be edited to be the same as what was referenced here to fix it which is something I overlooked. I will fix this for the next beta release.

Thank you for the report.

Sorry mate, I went down the wrong direction and waist everybody's  time...

I did actually find the right line after, and this is the only bits that I was actually wonder:

$modSettings['custom_avatar_url'] instead of $modSettings['setting_custom_avatar_url']

Could be this the problem...

Hey I'm only guessing and as you know, not that well  :D

Burt

Burt

Ok now I took the time to read your reply and understood...

No worries...

Burt

Chen Zhen


As far as I can tell you are talking about users that have not selected an avatar within their profile?
I will change it so Battle includes a custom icon for this (from the default theme actually) and have it use that in both places.

As for when a user has an avatar... I tested a custom package of avatars with different image types, a direct url avatar with different image types and uploaded some avatars with different types and they seem to work fine for me.

Burt

#37
Quote from: underdog on February 15, 2014, 12:36:10 AM

As far as I can tell you are talking about users that have not selected an avatar within their profile?
I will change it so Battle includes a custom icon for this (from the default theme actually) and have it use that in both places.

As for when a user has an avatar... I tested a custom package of avatars with different image types, a direct url avatar with different image types and uploaded some avatars with different types and they seem to work fine for me.

No No, that's not what I'm saying at all, I'm one of them and I do have my avatar that shows when I'm in the home screen, but pretty much all the users that have a "Custom" avatar, they don't show in the Attack page. Because the avatars do load in the Home screen, we can safely assume that there is nothing wrong with the avatars. The problem is that, only the "Custom" avatars, that are store elsewhere in the server as per "$modSettings['custom_avatar_url']", they do not load in the attack page (the page where you attack the other members). So I would be inclined to think that the function that calls for the avatar images in the attack page,  does not look for the "custom_avatar_url" like the home page does...I hope it make sense

Again just guessing here...


Now on a different note I just reset the game and have these setting (picture 1) and in the game members get these (picture n2) amount of gold to start, that's definitely not enough to play. Where does that 200 comes from?? Is that a way for us to adjust the initial amount of gold in the game?

Thanks

Burt

Chen Zhen

#38
  I know what display you are referring to for battling other members. I have also already informed you that I am not able to duplicate your gold issue (or the custom avatar issue) nor has anyone else reported this to me. Instead of going back & forth like this it might be best just to grant me access to your forum so I can see it for myself. For the gold issue this will most likely include admin access or maybe create a new membergroup to which I am the only member and allow that group battle admin access permissions. That way I can look at all the battle settings to see what is going on.

  Atm however, it is bed time so this will have to wait until tomorrow (2am here).. I can barely keep my eyes open.

Edit->
  Do you have the same avatar issue with the default theme specifically? There is css in that line of code you are having issues with is why I am asking.


$class = $key % 2 == 0 ? 'windowbg' : 'windowbg2';
echo '
<tr>
<td class="centertext ', $class, '" width="25%">
', $avatar = $row['avatar'] == '' ? ($row['id_attach'] > 0 ? '<img src="' . (empty($a['attachment_type']) ? $boardurl . '?action=dlattach;attach=' . $row['id_attach'] . ';type=avatar' : $modSettings['custom_avatar_url'] . '/' . $a['filename']) . '" alt="" width="25" height="25" style="border: 1px solid silver"/>' : '') : (stristr($row['avatar'], 'http://') ? '<img src="' . $row['avatar'] . '" alt="" class="avatar" width="25" height="25" style="border: 1px solid silver"/>' : '<img src="avatars/' . htmlspecialchars($row['avatar']) . '" alt="" class="avatar" width="25" height="25" style="border: 1px solid silver"/>');

if(empty($avatar))
echo '
<img border="0" src="', $settings['images_url'], '/battle/online.gif" width="25" height="25" alt="" />';


 

Burt

Sorry Underdog I already  told you before that I cannot do that. Anyway like you said, nobody else has reported these two problem, so lets move on.... :)

Thank you

Burt

Chen Zhen

Burt,

  You can't even supply me with the forum url so that I can register to see the images issue?
Did you try the default theme? All you do is put theme=1 in the url (surrounded by semi-colons)

Chen Zhen


  I bellieve I may have found the issue with the avatars although strangely enough it was working for me. It should have given us an undefined error in the log but did not which is also strange. Somehow that condition was not being triggered for me although I tested with custom uploaded avatars.

Here is a link for download that includes a fix. I did not bother changing the beta designation for this fix.

download:
http://s000.tinyupload.com/index.php?file_id=95018282712536636044


NekoJonez

 8)

Thanks for adding me to the credits. :3

Anyways, Arpegi (the name of my forum) always uses the latest beta you post. So, on that data I give you the feedback!

From the last beta, two small things. One, the changelog isn't up to date and two, the link to Burt's credit doesn't go to a blank page.

On the other hand, what did you think of my list of idea's Underdog?

Chen Zhen

#43
NekoJonez,

  I like your ideas and take everyone's into consideration. Atm I think it would be best to sort out all the bug fixes prior to implementing anything new because new additions may introduce more things that need honing.




Burt,
  If you are using the default gold member column then the only way I can see several members gold set at 200 is if you used the Admin -> Battle -> Members -> Edit Member .. setting gold to 200 at some point & then ticking one of the checkboxes at the top prior to using save on that page. This is the only way I can think of it adjuting those members to 200 gold. The stat settings in the config itself is only for members when they first register prior to playing the game.

  I forgot you told me about not being able to grant me that access. I am guessing the forum you are using this on is private and it just makes things easier to look directly at the issue sometimes but nothing can be done about that I suppose. My apologies for asking a second time in error.




  Hopefully the last fix solves the avatar issue and now I must concentrate on testing the gold issue to see what problem it may be having.  The mod has various adjustments for peoples stats therefore I have to be sure those are set correctly.

Thanks again to all beta testers and donators who help me out.

Regards.

Burt

Quote from: underdog on February 15, 2014, 10:17:16 AM

  I bellieve I may have found the issue with the avatars although strangely enough it was working for me. It should have given us an undefined error in the log but did not which is also strange. Somehow that condition was not being triggered for me although I tested with custom uploaded avatars.

Here is a link for download that includes a fix. I did not bother changing the beta designation for this fix.

download:
http://s000.tinyupload.com/index.php?file_id=95018282712536636044


:-[  I don't know how to break this to you, but still, no luck. Just for curiosity, last night (at around 3am  :) ) I did a test and assign to those 6 members (whom don't have the avatar displayed in the attack page) a avatars for the "avatars" folder, (what I practically did was move their avatar from the custom folder to the avatars folder on the server)and their avatar did show up straight away in the attack page.....

As per the gold issue I'm please to say that it is solved. My problem was the 3600 second (that's 1 hour) in the setting. What happen was that some member did play for a while, then go and do something else, but stay logged in, the come back and just open the home page and voilĂ , extra cash was becoming instantly available. So practically if the did click on the game 6 times in a day, that would have give them 6000 in gold (as the game was set to 1000 every 3600 seconds). The reason why I was getting so much more it is only because I was spending a lot more time on-line that they did. So I did fix the issue by changing the time from 3600 to 28800 (that's 8 hours).
So this is not a problem any more, but you need to set the time to a realistic number or leave it at 3600 but cut down the amount of gold by a lot, otherwise it does make it a lot harder for players that just log to play for a bit and then log out till the next day...

So my gold issue is SOLVED  :D

PS

The forum is at il-mozzo.net It is actually my brother's forum..

The Game is under Games/Mobsters

Burt