MyBB Community Forums
AptURL MyCodes - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: Resources (https://community.mybb.com/forum-8.html)
+--- Forum: MyCodes (https://community.mybb.com/forum-117.html)
+--- Thread: AptURL MyCodes (/thread-99240.html)



AptURL MyCodes - pinguy - 2011-07-18

This MyCode is using alternativeto.net to pull the info and apturl to install the software.
So an example for firefox would be.

[apt]firefox[/apt]

Giving you this:

[Image: XCMozEJ.png]

MyCode:

Title:
Apturl

Short Description:
Make apturl links

Regular Expression:
\[apt\](.*?)\[/apt\]

Replacement:
<fieldset class="notice"><legend><strong><a href="http://appnr.com/install/$1" target="_blank"> &#x25B6; Click Here To Install $1 &#x25C0;</strong></a></legend><br/><strong><img src="images/icons/exclamation.gif" ALIGN=ABSMIDDLE /><a href="http://alternativeto.net/searchresult.aspx?profile=linux&platform=linux&search=$1" target="_blank">No Info? Click here to search for $1</a></strong>:
<iframe src="http://alternativeto.net/software/$1/?profile=linux&platform=linux#appBox" width="580" height="100" target="_top" scrolling=no>
 <p>Your browser does not support iframes.</p>
</iframe>
<img src="images/globe-icon.png" ALIGN=ABSMIDDLE /> <strong><a href="http://www.google.com/search?hl=en&q={$1}&btnI=I%27m+Feeling+Lucky" title="Link to $1" target="_blank">VISIT WEBSITE</a></strong>
</fieldset>

Next go to Templates & Style, and pick your theme and select global.css then Edit Stylesheet: Advanced Mode.

And paste this into the bottom of it.

.apturl {

background:#efefef url(/images/download.png) center left no-repeat;

width:600px;

color:#465584;

background-color:#C7D8FF;

border-left:1px solid #023CC4;

border-right:1px solid #023CC4;

border-top:1px solid #023CC4;

border-bottom:1px solid #023CC4;

margin:0 auto 4px;

padding:5px 5px 5px 60px;

-moz-border-radius:6px 6px 6px 6px;

} 

Next download these images and upload them to "root/images/"

[Image: download.png] [Image: globe-icon.png]