Jump to content

What's the code to access the admin skin stuff?


Guest Michael

Recommended Posts

In IPB 2.1, you could access Admin skin elements with code such as this:

<img src='{$this->ipsclass->skin_url}/images/aff_tick.png' border='0' />


$this->ipsclass->skin_url doesn't appear to work anymore, it's apparently been replaced with something else. Since the source code is encrypted, any chance an IPS staffer could reveal just what this got changed to? (w00t)

Link to comment
Share on other sites

I think it's:

{$this->ipsclass->admin_skin_url}

If it's not right I apologize... I'm not at my PC at the moment, nor am I any where near my desk (on my laptop). Also with skin's you know how variables don't start with $'s? They do now, and the ipb. prefix was removed. You have to use $this->ipsclass-> now... And lastly the html logic is different:

<if="$var==true">
html code
<else />
html code2
</if>



And I *think* nesting is supported now. Don't remember what else... I know I'm forgetting something. That should get you started at least.

Link to comment
Share on other sites

Can't remember the function name, but there is a function in PHP that will list all the elements of an object in an array. If you use it on $ipsclass, you should be able to find what it is. Just put it in the admin templates code and it should be easy to find. I know it starts with "admin_" something and it has the word "skin" in it. Had used it last week... Would remember better if I had more practice doing Admin components :)... Most of the stuff I've done is on the board itself... First time I used the report center, besides using the settings class, is with the Report Center (you can read about that in my blog).

EDIT:

Found it:

http://us2.php.net/manual/en/function.get-object-vars.php

Had to open up one of my old projects through FTP... Could not remember what the function is, nor did I have any luck searching for it on php.net.

If you use on on $ipsclass in your admin template in conjunction with foreach+print/while+list+get+print you should be able to figure out what it is :)

EDIT 2:

It *might* have been:

{$this->ipsclass->admin_skin_path}

Link to comment
Share on other sites

Can't remember the function name, but there is a function in PHP that will list all the elements of an object in an array. If you use it on $ipsclass, you should be able to find what it is. Just put it in the admin templates code and it should be easy to find. I know it starts with "admin_" something and it has the word "skin" in it. Had used it last week... Would remember better if I had more practice doing Admin components :)... Most of the stuff I've done is on the board itself... First time I used the report center, besides using the settings class, is with the Report Center (you can read about that in my blog).



EDIT:



Found it:



http://us2.php.net/manual/en/function.get-object-vars.php

Had to open up one of my old projects through FTP... Could not remember what the function is, nor did I have any luck searching for it on php.net.



If you use on on $ipsclass in your admin template in conjunction with foreach+print/while+list+get+print you should be able to figure out what it is :)



EDIT 2:



It *might* have been:



{$this->ipsclass->admin_skin_path}

*Slaps self on forehead* Not sure why I didn't think of that, thanks. :)

Ah yes

$this->ipsclass->skin_acp_url

works


Awesome, that's what I'm looking for, thanks for your help. :)
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...