Michael Posted September 26, 2006 Share Posted September 26, 2006 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 More sharing options...
Luke Posted September 26, 2006 Share Posted September 26, 2006 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 More sharing options...
Michael Posted September 26, 2006 Share Posted September 26, 2006 Hmm, doesn't seem to like that either. I tried $this->ipsclass->admin->skin_url too, no dice. Thanks, though. :) Link to comment Share on other sites More sharing options...
Luke Posted September 26, 2006 Share Posted September 26, 2006 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.phpHad 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 More sharing options...
ryder Posted September 26, 2006 Share Posted September 26, 2006 It's <img src="{$this->ipsclass->adskin->img_url}/images/aff_tick.png" alt="" /> Link to comment Share on other sites More sharing options...
Luke Posted September 26, 2006 Share Posted September 26, 2006 It's <img src="{$this->ipsclass->adskin->img_url}/images/aff_tick.png" alt="" />That's one way to do it :). There is a variable with "admin_" in it... Will have to look at my template when I get home :) Link to comment Share on other sites More sharing options...
ryder Posted September 26, 2006 Share Posted September 26, 2006 Ah yes$this->ipsclass->skin_acp_url works Link to comment Share on other sites More sharing options...
Luke Posted September 26, 2006 Share Posted September 26, 2006 Ah yes$this->ipsclass->skin_acp_url worksThat's the one! :DI got to tutor my much-younger brother in Math today... Man has it bee a long time... A good ol refresh to make my mind more sharp :ph34r:... Calculus, eeeeek >_< Link to comment Share on other sites More sharing options...
Michael Posted September 27, 2006 Share Posted September 27, 2006 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.phpHad 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 worksAwesome, that's what I'm looking for, thanks for your help. :) Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.