MyBB Community Forums

Full Version: Can't View Links, and Ultimate MyCode package 1.2
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
OK, I am lazy, so I'll just quote directly from the release board:

MyCode package 1.2 Demo and Details:
http://www.evolutionx-productions.com/th...123#pid270


And the No View Links:
blueparukia Wrote:My first plugin in which I coded fully by myself, I am quite proud of it. Many thanks to Ryan Ashbrook who helped me a great deal with the MyBB Plugin System, and without him, this plugin would not be released for another few days Toungue

Details:
Basically it blocks links to guests, and users with a post count under 10 - or an amount you specify.

In the settings you can choose the following options:

Minimum Posts: Set the minimum amount of posts before users can view links.

Error Message: When a user clicks on a link, they will receive a javascript alert, you can customize what that alert says.

Link Replacement: What will a user see instead of the real link? By default they see a Link that - when clicked - produces the Javascript error message. You can change the wording of that link, or set it to nothing.


Requirements:

This has been tested on MyBB 1.2.9. If you have editied class_parser.php your changes will not work after activating this plugin, though they will resume to normal once it has been deactivated Smile


Cheers,

BP

Download: http://www.evolutionx-productions.com/products/p-9

"Can't View Links" is my first plugin entirely coded by myself, and is not coded well, due to the fact the regex hates me. Even though it is mentioned in my above quote, do not upload "Can't View Links" if you have modified class_parser.php in anyway/

Downloads (require forum registration):
http://www.evolutionx-productions.com/products


Cheers,

BP
Thanks a lot ... I was looking for this link permission MOD since long Smile
If you want suggestions for your bbCodes...:
(if you don't want to see criticism, LOOK AWAY!!! Toungue)

  • Spoiler tag causes a Javascript error here (using Firefox 2)
    (I would post my spoiler tag, but it's done through the parser to allow nested tags, so I won't post it here)
  • IFrames can be very dangerous. I actually have a similar code on my board, however, IFrames are loaded through DHTML (user must explicitly click a "link" for the page to appear). Why? Because if they frame some page with a whole load of dangerous Javascript... even mods will have a hard time getting rid of it...
    Here's my IFrame codes (I use [page]), simply added through the AdminCP:
    Embedded Webpage
    Regex:
    \[page\]([^"[]+?)\[/page\]
    Replacement:
    <small><em><a href="$1" title="Link to the original page" target="_blank">Object Link</a></em></small>
    <div style="padding: 0 0 0 0; width: 100%; height: 360px;">
    <div style="cursor: pointer" onClick="this.parentNode.getElementsByTagName('div')[0].innerHTML='<iframe width=\'100%\' height=\'360\' src=\'$1\'>[Embedded Webpage]</iframe>';" onMouseOver="this.getElementsByTagName('div')[0].style.background='#C0C0C0';" onMouseOut="this.getElementsByTagName('div')[0].style.background='#E0E0E0';"><div style="text-align: center; vertical-align: middle; font-size: 1.3em; background: #E0E0E0; border-width: 1px; border-color: #A0A0A0; border-style: solid; width: 100%; height: 360px; overflow: hidden"><img src="http://endlessparadigm.com/img/webpage.gif" style="margin-top: 20px"><br>Click here to view embedded webpage
    <br /><font size="-2">Please note that by activating this feature, there may be undesirable consequences
    <br /><br />Page: $1</font></div></div></div>

    Embedded Webpage with Dimensions
    Regex:
    \[page=([0-9]{1,3})x([0-9]{1,3})\]([^"[]+?)\[/page\]
    Replacement:
    <small><em><a href="$3" title="Link to the original page" target="_blank">Object Link</a></em></small>
    <div style="padding: 0 0 0 0; width: $1px; height: $2px;">
    <div style="cursor: pointer" onClick="this.parentNode.getElementsByTagName('div')[0].innerHTML='<iframe width=\'$1\' height=\'$2\' src=\'$3\'>[Embedded Webpage]</iframe>';" onMouseOver="this.getElementsByTagName('div')[0].style.background='#C0C0C0';" onMouseOut="this.getElementsByTagName('div')[0].style.background='#E0E0E0';"><div style="text-align: center; vertical-align: middle; font-size: 1.3em; background: #E0E0E0; border-width: 1px; border-color: #A0A0A0; border-style: solid; width: $1px; height: $2px; overflow: hidden"><img src="http://endlessparadigm.com/img/webpage.gif" style="margin-top: 20px"><br>Click here to view embedded webpage
    <br /><font size="-2">Please note that by activating this feature, there may be undesirable consequences
    <br /><br />Page: $3</font></div></div></div>

    ... for those with Javascript disabled ... meh.
  • Bounce and downards marquee are only supported by IE (I think)...
looks nice, I'll try it soon thanks Smile
Edit: but why didn't you submit it to mybb mods site? it'll be better I think
Meh, they are demo plugins. As for the frames, I made that as a custom request a while back and never, ever use them.

Quote:Bounce and downards marquee are only supported by IE (I think)...

Uses <marquee> tag, which will work on IE6+, Opera, Safari and Firefox. Its invalid HTML, but it works.

Javascript error, damn Firefox, it gets less compatible with every uppdate to Gecko. I'll look at it,

I am gonna get rid of that crap code in the links plugin though, instead of rename, make it fwrite....

BP