On these pages are my WordPress plugins, the odd article and my Support Forum.

For my random rantings on everything else please visit my blog at Yellow Swordfish

WP Plugins


Articles

If you find any of my plugins useful, please comsider a donation towards my running costs.

Thank you

In preparation for the release of the first beta of Simple:Press Version 4.0, the Support Forum has moved to a new site dedicated to the plugin. This will also be the future home for Simple:Press Forum.


Version 3.1.4 will still be available for download here in the short term.


For the support forum - and to visit our new site click on the logo to take you to simplepressforum.com

This forum is currently locked - access is read only
Current User: Guest
Please consider registering

 
Search Forums:


 




Adding own icons to applications

UserPost

11:07 am
11 Jul 2007


Håkan Carlström

Guest

1

Thank you for a very good plugin.

I wondered if it was possible to add your own icons to activated applications in Admin drop menus. After examining and changing the admin drop menu code (adminmenus.php) I succeded.

This is how I changed it:

In function aws_adminmenu_build () replace:

     $mtype = "<img src=’" . $ipath . "plugin.png’ height=’16′ width=’16′ alt=”/>&nbsp;";
with:

     $icon_dir = str_replace(".php","","{$item[2]}") ;
     $icon_path = ABSPATH . "wp-content/plugins/{$icon_dir}.png" ;
     if (file_exists($icon_path)) {
      $icon = trailingslashit(get_option(’siteurl’)) . "wp-content/plugins/{$icon_dir}.png" ;
      $mtype = "<img src=’" . $icon . "’ height=’16′ width=’16′ alt=”/>&nbsp;";
     }
     else {
      $mtype = "<img src=’" . $ipath . "plugin.png’ height=’16′ width=’16′ alt=”/>&nbsp;";
     }

You can now add icons (16×16) into the directory of the plugin. The name of the icon must be the same as the php-file which is called from the admin-panel but the ".php" replaced with ".png".

Examples:

Aksimet -> akismet-admin.png

phpMyAdmin -> wp-phpmyadmin.png (in folder wp-phpmyadmin)

wp-SimpleViewer -> wp-simpleviewer.png (in folder simpleviewer)

Event CAlendar -> ec3_admin.png

Role-Manager -> role-manager.png (in folder role-manager)

(My own) Codeviewer -> codeviewer-options.png (in folder codeviewer) 

Yours

Håkan Carlström

1:54 pm
11 Jul 2007


Yellow Swordfish

Admin

Peterborough, England

posts 5252

2

Neat reasoning. I’ll give it a go. Any obejctions to letting me use this?

2:05 pm
11 Jul 2007


Håkan Carlström

Guest

3

Go ahead, use it.

I have implemented icons for (my own) Codeviewer, Event Calendar and Role-manager so far.

/Håkan Carlström

2:16 pm
11 Jul 2007


Yellow Swordfish

Admin

Peterborough, England

posts 5252

4

Thanks

1:07 pm
12 Jul 2007


jfv

Member

posts 82

5

Håkan Carlström said:

Thank you for a very good plugin.

I wondered if it was possible to add your own icons to activated applications in Admin drop menus.


Good idea, and thanks for the code.

1:14 pm
12 Jul 2007


Yellow Swordfish

Admin

Peterborough, England

posts 5252

6

I have just been discussing this with Håkan and pointed out that it is already possible to add your own icons to the menus using the filter that was added to the current versions (see the readme file that came with them).

I thnk perhaps there is room for both solutions with the filter being a little more ‘techie’ but the flter route would execute faster. 

As to the stats footer, I’m a littler torn with the idea of customisation to be honest. The amount of queries this is beginning to action is getting worrisome. 

 

About the Stuff at Yellow Swordfish forum

Currently Online:

13 Guests

Maximum Online: 71

Forums:

Groups: 3

Forums: 16

Topics: 2068

Posts: 14091

Members:

There are 1003 members

There are 837 guests


Yellow Swordfish has made 5252 posts

Top Posters:

Mr Papa - 1602

-Radio- - 558

ovizii - 114

jfv - 82

angelic007 - 72

Administrator: Yellow Swordfish | Moderators: Yellow Swordfish, Mr Papa, -Radio-


© Simple:Press Forum - Version 3.1.4 (Build 357)