Some request/improvements for Hide User Details Mod

Found a bug? Miss something? Want to leave a comment about this site?
Then this is the forum to post in.
Forum rules
No phpBB Support in this Forum! If you want support for your forum, go here.
Post Reply
ALIENQuake
New member
New member
Posts: 5
Joined: 20 Feb 2011, 03:12

Some request/improvements for Hide User Details Mod

Post by ALIENQuake »

Hello.

I wanted to post my suggestion for this mod, i think that it will more convenient to adapt it to different styles.

Also i want to make such changes but i don't have php knowledge so i need help from anyone who can make small changes in modification code.

1. I already make small change:

Code: Select all

&nbsp;<a href="#" id="href_{postrow.POST_ID}" onclick="showDisplay({postrow.POST_ID}); return false;"><img src="{ROOT_PATH}images/open.png" alt="{L_SHOWDETAILS}" title="{L_SHOWDETAILS}" height="9px" width="9px" /><strong> {L_USERDETAILS}</strong></a>


This allows for whole legend to be clickable, not only icon: "Dane użytkownika" means "User details", i change icons also
[img]http://screenshooter.net/1651205/20_02_2011__16_16_05/skrin[/img]

i can show user details, but when i click on it, icon stay but "Dane użytkownika" disappear:
[img]http://screenshooter.net/1651205/20_02_2011__16_06_22/skrin[/img]

I can hide user details by clicking on an icon, but "Dane użytkownika" will not be showed until i will refresh page.
How to make "Dane użytkownika" not disappear after first click ?

2. In additional to this, i want to use two description: "Show user details" and "Hide user details" for hidden user details and visible user details.

First thing that come to my mid is: 'This modification will allow use of this mod in themes that don't use icons at all" etc

Any help with archiving this will be appreciated.
User avatar
RMcGirr83
Supporter
Supporter
Posts: 6243
Joined: 30 Nov 2006, 14:23
Real name: Rich McGirr

Re: Some request/improvements for Hide User Details Mod

Post by RMcGirr83 »

Check the js edits to viewtopic_body.html. The javascript changes what is displayed.
ALIENQuake
New member
New member
Posts: 5
Joined: 20 Feb 2011, 03:12

Re: Some request/improvements for Hide User Details Mod

Post by ALIENQuake »

My friend was able to do some hardcoded JS:

Code: Select all

<script type="text/javascript"> 
   $(function(){
      var imgOpen = '<img style="margin-right:5px" src="{T_THEME_PATH}/images/open.png">';
      var imgClose = '<img style="margin-right:5px" src="{T_THEME_PATH}/images/close.png">';
      var hideDetails = '{LA_USERDETAILS_HIDE}';
      var showDetails = '{LA_USERDETAILS_SHOW}';
      $('.vt-stats, .showHideToggle').each(function(){
         var diz = $(this);
         diz.hide().before('<div style="text-align:left; font-size:12px;">'+imgOpen+'<a class="showHide" href="#">'+showDetails+'</a></div>');
         diz.prev().find('.showHide').click(function(){
            if ($(this).text() == showDetails) {
               $(this).text(hideDetails);
               $(this).prev('img').hide();
               $(this).before(imgClose);
            }
            else if ($(this).text() == hideDetails) {
               $(this).text(showDetails);
               $(this).prev('img').hide();
               $(this).before(imgOpen);
            }
            diz.toggle("normal");
            return false;
         })
       });
      
   });
</script>


It have flaws but maybe you can use it and integrate with Hide User Details Mod ?
User avatar
RMcGirr83
Supporter
Supporter
Posts: 6243
Joined: 30 Nov 2006, 14:23
Real name: Rich McGirr

Re: Some request/improvements for Hide User Details Mod

Post by RMcGirr83 »

Uhmmm, it already uses js to open and close. What was the purpose of your friend doing the js you posted?
ALIENQuake
New member
New member
Posts: 5
Joined: 20 Feb 2011, 03:12

Re: Some request/improvements for Hide User Details Mod

Post by ALIENQuake »

Well, he tell me that he will do it "better". I find this pretty much ok but there are some issues eg:

- i can't chose what elements i can hide without modifying script, i was able to figure out how to change it in you original mod, but now I'm lost

- before second icon will be load to user browser, the "Show information" text is moved to the left side, when the loading close icon is finished, it move whole information back to the correct location - it is small but bad visual behavior

If you want, you can use this example to improve you mod.
User avatar
RMcGirr83
Supporter
Supporter
Posts: 6243
Joined: 30 Nov 2006, 14:23
Real name: Rich McGirr

Re: Some request/improvements for Hide User Details Mod

Post by RMcGirr83 »

Then I guess it isn't really better if you are having issues with it.
ALIENQuake
New member
New member
Posts: 5
Joined: 20 Feb 2011, 03:12

Re: Some request/improvements for Hide User Details Mod

Post by ALIENQuake »

Ok ... no motivation for improvements :( I guess i will have to live with "what mod i should chose now, there are two but they can work as expect only after combine them" :( :( :(
User avatar
RMcGirr83
Supporter
Supporter
Posts: 6243
Joined: 30 Nov 2006, 14:23
Real name: Rich McGirr

Re: Some request/improvements for Hide User Details Mod

Post by RMcGirr83 »

There is nothing to "improve" as I am not really sure what it is you are talking about as is. I have the mod installed on my forum and it works just fine. Then again it may be a style issue as well.

Provide some screen shots or something for someone to be able to assist you further.
User avatar
Ooopsie
Supporter
Supporter
Posts: 1213
Joined: 19 Aug 2010, 16:34
Location: Index, WA
Contact:

Re: Some request/improvements for Hide User Details Mod

Post by Ooopsie »

This MOD works better than described AND it would be fairly easy to hide certain elements from users within the MOD.
I SUCK at PHP - I'm only a 4.5 on a 1-10 scale and this MOD was one of the easier ones to get up and running and to manipulate.
Image
Oopsie
_____
Be who you are and say what you feel.
Those who mind don't matter.
Those who matter don't mind.
- Dr. Seuss

_____
And be kinder than necessary, for everyone
you meet is fighting some kind of battle.
Post Reply