MyBB Community Forums

Full Version: [Mycode] Greybox ( image & web )
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
Title : Greybox

Description MyCode : Faire un effet style "lightbox"

Expression : \[greybox\](.*?)\[/greybox\]

Remplacement :<i>reduce images</i><br><a href=$1 title="greybox effet" rel="gb_image[]"><img src='$1' width=200 border=0></a>

activate MyCode ? : yes

Modify your template "headerinclude" , add :

<script type="text/javascript">
    var GB_ROOT_DIR = "jscripts/greybox/";
</script>
<script type="text/javascript" src="jscripts/greybox/AJS.js"></script>
<script type="text/javascript" src="jscripts/greybox/AJS_fx.js"></script>
<script type="text/javascript" src="jscripts/greybox/gb_scripts.js"></script>
<link href="jscripts/greybox/gb_styles.css" rel="stylesheet" type="text/css" />


For images attachement :

You go to template => Post Bit Templates => postbit_attachments_thumbnails_thumbnail
Del code & place :
<a href="attachment.php?aid={$attachment['aid']}"  rel="gb_image[]"><img src='attachment.php?thumbnail={$attachment['aid']}'</a>
##############################################

For web ^^

Title : Greybox web

Description MyCode :Make a style "lightbox" to view a web page

Expression : \[web=(.*?)\](.*?)\[/web\]

Remplacement :<b><a href="$1" title="$2" rel="gb_page_fs[]">$2</a></b>

Activate MyCode ? : yes

Demo mycode image

Demo mycode web
Nice but I prefer something to alter existing attachment images.
Nice job, i like more the popbox, but this is really great
Check this thread!

http://www.projectw.pk/thread-7490.html

I activated it and its working to reduce size but its not giving grey effect
(2008-11-13, 06:18 PM)labrocca Wrote: [ -> ]Nice but I prefer something to alter existing attachment images.

I know how to do this. If you want I can write up a tutorial. Only takes around 3 minutes to do...
Up ,
I'm modify my first post , for add Mycode webpage style greybox Wink
Enjoy!
(2008-11-13, 06:18 PM)labrocca Wrote: [ -> ]Nice but I prefer something to alter existing attachment images.

You go to template => Post Bit Templates => postbit_attachments_thumbnails_thumbnail
Del code & place :
<a href="attachment.php?aid={$attachment['aid']}"  rel="gb_image[]"><img src='attachment.php?thumbnail={$attachment['aid']}'</a>

Wink
ah nice work, i love it Smile
Thx =)
(2008-11-27, 05:01 PM)¤ Magic ¤ Wrote: [ -> ]
(2008-11-13, 06:18 PM)labrocca Wrote: [ -> ]Nice but I prefer something to alter existing attachment images.

You go to template => Post Bit Templates => postbit_attachments_thumbnails_thumbnail
Del code & place :
<a href="attachment.php?aid={$attachment['aid']}"  rel="gb_image[]"><img src='attachment.php?thumbnail={$attachment['aid']}'</a>

Wink

Thanks!!!!
Pages: 1 2 3