Welcome, Guest
Username Password: Remember me
Joomla!Day USA West | October 1-3, 2010

showing full image in shadowbox hack
(1 viewing) (1) Guest

TOPIC: showing full image in shadowbox hack

showing full image in shadowbox hack 1 year, 2 months ago #1

open kunena.parser.php file and find this:
 
$tag_new = "<a href='".$between."' rel=\"lightbox\"><img src='".$between.($imgtagsize ?"' width='".$imgmaxsize:'')."' style='max-width:".$imgmaxsize."px; ' alt='' /></a>";


and change to this:

 
$tag_new = "<a href='".$between."' rel=\"shadowbox\"><img src='".$between.($imgtagsize ?"' width='".$imgmaxsize:'')."' style='max-width:".$imgmaxsize."px; ' alt='' /></a>";


then open view.php and add this codes at top:
<link rel="stylesheet" type="text/css" href="<?php echo KUNENA_DIRECTURL . '/template/default';?>/plugin/shadowbox/shadowbox.css">
<script type="text/javascript" src="<?php echo KUNENA_DIRECTURL . '/template/default';?>/plugin/shadowbox/shadowbox.js"></script>
<script type="text/javascript">
Shadowbox.init({
language: "tr",
players: ["img"]
});
</script>


and finally copy sahdowbox folder at the attachment to your default/plugin folder.

thats all

ps: if you have my shadowbox preview hack, you can only copy shadowbox-img.js file to default/plugin/shadowbox/player folder.

ps2: language: "tr",
change this part to your language.

File Attachment:

File Name: shadowbox_build_3.zip
File Size: 58777
Attachments:
  • guerilla
  • OFFLINE
  • Senior Boarder
  • Posts: 136

Re: showing full image in shadowbox hack 1 year, 2 months ago #2

you can test this hack from this demo page:
www.genctasarim.biz/deneme/index.php?opt...mp;catid=2&id=27
  • guerilla
  • OFFLINE
  • Senior Boarder
  • Posts: 136
Last Edit: 1 year, 2 months ago By guerilla.

Re:showing full image in shadowbox hack 1 year, 2 months ago #3

guerilla wrote:
[quote]open kunena.parser.php file and find this:
 
$tag_new = "<a href='".$between."' rel=\"lightbox\"><img src='".$between.($imgtagsize ?"' width='".$imgmaxsize:'')."' style='max-width:".$imgmaxsize."px; ' alt='' /></a>";


and change to this:

 
$tag_new = "<a href='".$between."' rel=\"shadowbox\"><img src='".$between.($imgtagsize ?"' width='".$imgmaxsize:'')."' style='max-width:".$imgmaxsize."px; ' alt='' /></a>";


i can't find it on my kunena.parser.php, on which line can i add this.
thanx
  • 810
  • OFFLINE
  • Kunena Developer
  • Posts: 578
Your feedback on the JED helps us improve Kunena.

Re:showing full image in shadowbox hack 1 year, 2 months ago #4

i wrote for kunena 1.0.10, i guess u use another version or modified version.
search this:
$tag_new = "<a href='".$between."'><img src='".$between.($imgtagsize ?"' width='".$imgmaxsize:'')."' style='max-width:".$imgmaxsize."px; ' alt='' /></a>";


if you find change as second code.
  • guerilla
  • OFFLINE
  • Senior Boarder
  • Posts: 136
Last Edit: 1 year, 2 months ago By guerilla.

Re:showing full image in shadowbox hack 1 year, 2 months ago #5

Can't find it. i am useing JoniJnm edition.
is it the:
case 'img':
on line +- 344
  • 810
  • OFFLINE
  • Kunena Developer
  • Posts: 578
Your feedback on the JED helps us improve Kunena.

Re:showing full image in shadowbox hack 1 year, 2 months ago #6

no. i dowloaded jonijnm edition an took a look.
find this code:
$tag_new .= "<img src='".$between."'".(($imgtagsize) ? " width='".$imgtagsize."'" : "")." border='0'/></div>";



and replace with this:
					if($task->autolink_disable == 0)
{
$tag_new. = "<a href='".$between."' rel=\"shadowbox\"><img src='".$between.($imgtagsize ?"' width='".$imgmaxsize:'')."' style='max-width:".$imgmaxsize."px; ' alt='' /></a>";
}
else
{
$tag_new. = "<img src='".$between.($imgtagsize ?"' width='".$imgmaxsize:'')."' style='max-width:".$imgmaxsize."px; ' alt='' />";
}
$tag_new .= '</div>';
  • guerilla
  • OFFLINE
  • Senior Boarder
  • Posts: 136

Re:showing full image in shadowbox hack 1 year, 2 months ago #7

iam also using rolands hack for guest image.

case 'img':
if($between) {
// rolandshack start
if ($my->id==0 && $GLOBALS["fbConfig"]->showimgforguest==0) {
// Hide between content from non registered users
$tag_new = '<b>' . _KUNENA_BBCODE_HIDEIMG . '</b>';
}
else
{
$task->autolink_disable--;
$width = (int)(($GLOBALS["fbConfig"]->rtewidth * 9) / 10);
$height = (int)$GLOBALS["fbConfig"]->rteheight;
$imgtagsize = isset($tag->options["size"]) ? (int)htmlspecialchars($tag->options["size"]) : 0;
 
$tag_new = '<div style="width: '.$width.'px; border: 0px inset; margin: 0px; padding: 6px; overflow: auto; max-height: '.$height.'px; text-align: center;">';
$tag_new .= "<img src='".$between."'".(($imgtagsize) ? " width='".$imgtagsize."'" : "")." border='0'/></div>";
// rolandshack start
}
// rolandshack end
//Fin JoniJnm
return TAGPARSER_RET_REPLACED;
}
return TAGPARSER_RET_NOTHING;
break;


and if i changed it , i get a blank screen.
case 'img':
if($between) {
// rolandshack start
if ($my->id==0 && $GLOBALS["fbConfig"]->showimgforguest==0) {
// Hide between content from non registered users
$tag_new = '<b>' . _KUNENA_BBCODE_HIDEIMG . '</b>';
}
else
{
$task->autolink_disable--;
$width = (int)(($GLOBALS["fbConfig"]->rtewidth * 9) / 10);
$height = (int)$GLOBALS["fbConfig"]->rteheight;
$imgtagsize = isset($tag->options["size"]) ? (int)htmlspecialchars($tag->options["size"]) : 0;
 
$tag_new = '<div style="width: '.$width.'px; border: 0px inset; margin: 0px; padding: 6px; overflow: auto; max-height: '.$height.'px; text-align: center;">';
if($task->autolink_disable == 0)
{
$tag_new. = "<a href='".$between."' rel=\"shadowbox\"><img src='".$between.($imgtagsize ?"' width='".$imgmaxsize:'')."' style='max-width:".$imgmaxsize."px; ' alt='' /></a>";
}
else
{
$tag_new. = "<img src='".$between.($imgtagsize ?"' width='".$imgmaxsize:'')."' style='max-width:".$imgmaxsize."px; ' alt='' />";
}
$tag_new .= '</div>'; // rolandshack start
}
// rolandshack end
//Fin JoniJnm
return TAGPARSER_RET_REPLACED;
}
return TAGPARSER_RET_NOTHING;
break;
  • 810
  • OFFLINE
  • Kunena Developer
  • Posts: 578
Your feedback on the JED helps us improve Kunena.

Re:showing full image in shadowbox hack 1 year, 2 months ago #8

you use such more modificatin

i guess $imgmaxsize veriable not decelerated at jonijnm edition,
so change this part:
$tag_new. = "<a href='".$between."' rel=\"shadowbox\"><img src='".$between.($imgtagsize ?"' width='".$imgmaxsize:'')."' style='max-width:".$imgmaxsize."px; ' alt='' /></a>";


to this:
$tag_new. = "<a href='".$between."' rel=\"shadowbox\"><img src='".$between."'".(($imgtagsize) ? " width='".$imgtagsize."'" : "")." border='0'/></div></a>";


but it may be not resize images if jonijnm itself hasnt got a max image size property.
  • guerilla
  • OFFLINE
  • Senior Boarder
  • Posts: 136
Last Edit: 1 year, 2 months ago By guerilla.

Re:showing full image in shadowbox hack 1 year, 2 months ago #9

yes i use alot of hacks and plugins. iam making my own edition Ultimate NL.

but i still get a blank screen. can you post the codes. from
case 'img':
until
return TAGPARSER_RET_NOTHING;
break;
.

I am on my work. using a virualpc so i can't download attach. and i i'm busy on my laptop to get my edition ready. I only waiting for the hack suspend and the hack Restricted Forum User For Kunena 2.0 for kunena 1.0.10.

thanks for you help.
  • 810
  • OFFLINE
  • Kunena Developer
  • Posts: 578
Your feedback on the JED helps us improve Kunena.

Re:showing full image in shadowbox hack 1 year, 2 months ago #10

it is not necessary, just open your original kunena.parser.php file and change this:

$tag_new .= "<img src='".$between."'".(($imgtagsize) ? " width='".$imgtagsize."'" : "")." border='0'/></div>";

to this:
$tag_new .= "<a href='".$between."' rel=\"shadowbox\"><img src='".$between."'".(($imgtagsize) ? " width='".$imgtagsize."'" : "")." border='0'/></a></div>";


here i installed jonijnm for testing and it works:
www.genctasarim.biz/deneme/index.php?opt...mp;catid=2&id=27

but as i guess at upper message jonijnm edition not resize large images. it show them in a div with scrollbars.
  • guerilla
  • OFFLINE
  • Senior Boarder
  • Posts: 136
Last Edit: 1 year, 2 months ago By guerilla.
Time to create page: 1.11 seconds