ejabberd - Comments for "Add Logo to Web Interface" https://www.ejabberd.im/node/298 en I have not found it https://www.ejabberd.im/node/298#comment-1186 <p>I have not found it in Windows help to solve this problem please</p> Fri, 23 Dec 2005 09:25:54 +0000 inviner comment 1186 at https://www.ejabberd.im Excellent! https://www.ejabberd.im/node/298#comment-618 <p>I'll give it a go. Thanks a lot!</p> Mon, 11 Jul 2005 19:09:51 +0000 bbrazell comment 618 at https://www.ejabberd.im Here is the patch https://www.ejabberd.im/node/298#comment-603 <p>Here is the patch. You need to replace the base64-encoded image, and possibly the dimensions, but you'll probably want to keep the height as it fits nicely in the rest of the design.</p> <pre>--- orig/src/web/ejabberd_web_admin.erl +++ mod/src/web/ejabberd_web_admin.erl @@ -68,7 +68,10 @@ [{"id", "container"}], [?XAE("div", [{"id", "header"}], - [?XE("h1", + [?XA("img", + [{"id", "cd-logo"}, + {"src", "/admin/cd-logo.png"}]), + ?XE("h1", [?ACT("/admin/", "ejabberd administration")] )]), ?XAE("div", @@ -125,6 +128,14 @@ height: auto; } +#cd-logo { + position: absolute; + top: 6px; + right: 6px; + width: 63px; + height: 42px; +} + #header h1 { width: 100%; height: 55px; @@ -466,6 +477,27 @@ "1c5dvhSU2BpKqBXl6R0ljYGS50R5zVC+tVD+vfE6YyUexE9x7g4AAAAASUVO" "RK5CYII="). +cd_logo() -&gt; + jlib:decode_base64( + "iVBORw0KGgoAAAANSUhEUgAAAD8AAAAqCAYAAAAERIP3AAAABmJLR0QA/wD/AP+gvaeTAAAACXBI" + "WXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH1QYRFg0H2qPWSgAAA2pJREFUaN7l2s9rVFcUB/DPu4yQ" + "1iKSULAu46qg3TwEDa10J2Il0E3wHxiLi0qXxYYGUumy6ELq+wdKNoVgRdyVVBJLeJsqdJUsbaEo" + "EmoJGPK6yE06nSbjTHInb0K/y+HNufd7zrnn172ZXSJvVodxFueQ4yTewaH4ySv8hicoMYeFsshe" + "7qfMTsh6JJzhNK5gHCM9rvcMs7iDxbLIqn7ITEo+b1aiJaZxHsHesI4H+BafJJY5ibIsXk8tdEH8" + "LdzEI1xIsElYxU8YSygzRFmPcDPue/fk82b1LubxKRrSYAkf4uuohNRoxP3Ox/33Tj5vVmN4iFMJ" + "N1bi/bLIFrtxyz3iFB5GHt2Tj3+4h+HExC+URfZ7y29VnxUwjHs7KSDs4Op3cTThJpbwUVlkf9h/" + "HMXd7Y5A2Ca4zSS2+F+43Gbx/cYwZtqDYGhLZzcSn3H4Cosp6owEMeBG5Pkfy+e4mnjBJ/hmH4Jb" + "t7gaef5DPlZZ0wnT2SamyiJbNThoYDry3bL86VhlpcQvsezshKoGBZyPfLfIX0lUZbWiKItsLWVv" + "kQgh8hViJzWeeIFVfG9wMZ43q8MhtpAjiYWX6Ca1VTWRH8HZEHvn1JjrpbWsCedCa+hPbPnk84TE" + "yANG+yB42eBjNOB4YqFreHoAyB8POJJY6CusdPltnXHhSKhZ+7XWvaEHK3WLQ33wpn5gJfThfDZ6" + "iCN1uv3T0KfIPHoALL8cesjJPeXQA3Dmy2Dj1iN59bTZNg4w5gIWbNx6pLb8sQEm/gwLId5zzSYW" + "PoSPBzjgzZZF9nIzz9+xcd2TEs28WTUG0Orrke/WAGPRxj1XSrzXxZygjrjwIPLdIB/bz8lYl6fE" + "VN6shgbI7dcwudluh7Y29HbixU7is9Zxcc243Zrat8jH8fJ1PE684BfiwLBmPMb11jH6vxqbssj+" + "xASeJ1z0TXyXN6tjNZ7555iI/LYnHxXwKy7hRcLFT+CHvFm9XYPFX+BS5KUj+aiAeVxM7AE57u/g" + "Af20+MXIpze3izebM9Le3y3hckw3X2Kqj2d8YjuLd7R82xEYw62EafAEfsTneKNP6ewWxjoRfy35" + "liB4DWdwP1ElOIQP8HNCmetR1hlcaw9ue66w/pdP0XZQRPuDwdE4wdkcYa3EKdGy3T9C3LPMTvgb" + "iI0ljMy4TeIAAAAASUVORK5CYII="). + process_admin(#request{us = US, path = [], q = Query, @@ -511,6 +543,12 @@ {200, [{"Content-Type", "image/png"}], logo_fill()}; process_admin(#request{us = US, + path = ["cd-logo.png"], + q = Query, + lang = Lang} = Request) -&gt; + {200, [{"Content-Type", "image/png"}], cd_logo()}; + +process_admin(#request{us = US, path = ["acls-raw"], q = Query, lang = Lang} = Request) -&gt; </pre> Thu, 07 Jul 2005 11:15:47 +0000 legoscia comment 603 at https://www.ejabberd.im Sounds good... https://www.ejabberd.im/node/298#comment-599 <p>Sure. If you can hunt down the patch, that would be great!</p> <p>Thanks in advance!</p> Wed, 06 Jul 2005 17:00:39 +0000 bbrazell comment 599 at https://www.ejabberd.im Depends on how you define "easy" https://www.ejabberd.im/node/298#comment-582 <p>That depends on how you define "easy". I found the code in src/web/ejabberd_web_admin.erl quite easy to read, so I included an &lt;img&gt; tag in the XHTML tree, added some style rules in the CSS, and added the base64-encoded logo in about half an hour (including some tweaking of the logo image). Of course, there could be a more general mechanism for this...</p> <p>I don't have it handy right now, but I can dig out the patch if it would help you.</p> Wed, 29 Jun 2005 09:24:55 +0000 legoscia comment 582 at https://www.ejabberd.im