Resource icon

[XFR] User Albums 1.0.0 b7

No permission to download
You are going to want to tell me to ask in the specific add-on discussion, but it is a dead add-on with no support. I think this may very well be used for other add-ons as well so I am going to ask anyway.

I am using XFRu's User Albums to power my user's albums and my site's gallery (by using global albums for the latter). I have the site gallery registered to a user account with the same name as my site, so it shows up as my forum's album. What I would like to do is figure out how to keep this user from showing up in the main listing for the user albums, since it's supposed to be a separate feature. Also, I would like to adjust the breadcrumb for just this one user. I know how to edit the bread crumb, but I do not know how to single out the user. I am hoping someone can help me with an if-then-else statement or whatever I would need to get this going.
 
Below is the code from the xfr_useralbums_albums_list_grid template. In bold is the code I used to separate my "special" user from the rest, thus changing the breadcrumb to show that I am in the gallery instead of albums. The next step is to have albums displayed in the breadcrumb when I am viewing albums and images.
Code:
        <xen:breadcrumb source="$breadCrumbs" />

Returns album owner>album name. Can anyone advise how to edit code to show album name only?

Still looking for advise on how to exclude the "special" users albums from showing up in the main album grid.

Code:
<xen:require css="xfr_useralbums_album_list_grid.css" />

<xen:title>{xen:phrase xfr_useralbums_user_albums}</xen:title>

<!-- Galleries -->
<xen:if is="{$album.user_id} == 1351">

<xen:navigation>
        <xen:breadcrumb href="http://firewoodhoardersclub.com/forums/index.php?useralbums/firewood-hoarders-club.1351/list">Galleries</xen:breadcrumb>
</xen:navigation>
<xen:else />
<xen:navigation>
        <xen:breadcrumb href="http://firewoodhoardersclub.com/forums/index.php?useralbums/">Albums</xen:breadcrumb>
        <xen:breadcrumb source="$breadCrumbs" />
</xen:navigation>
</xen:if>
<!-- End Galleries -->

<xen:if is="{$canCreateAlbum}">
    <xen:topctrl>
        <a href="{xen:link useralbums/create}" class="callToAction"><span>{xen:phrase xfr_useralbums_create_own_album}</span></a>
    </xen:topctrl>
</xen:if>

<div class="pageNavLinkGroup">
    <xen:pagenav link="useralbums" linkdata="" linkparams="" page="{$page}" perpage="{$albumsPerPage}" total="{$totalAlbums}" />
</div>

<div class="albumList section sectionMain">
   
<xen:if is="{$albums}">

    <xen:include template="xfr_useralbums_album_list_grid_holder" />
   
<xen:else />
    {xen:phrase xfr_useralbums_there_are_no_albums_yet}
</xen:if>
</div>

<xen:sidebar>
    <xen:if is="{$recentComments}">
        <div class="section UserAlbumsSidebar UserAlbumsSidebarComments">
            <div class="secondaryContent">
                <h3>{xen:phrase xfr_useralbums_recent_comments}</h3>
               
                <ol class="UserAlbumsRecentEntryCommentList">
                    <xen:foreach loop="$recentComments" value="$recentComment">
                        <xen:include template="xfr_useralbums_index_recent_comment" />
                    </xen:foreach>
                </ol>
            </div>
        </div>
    </xen:if>

    <xen:include template="xfr_useralbums_sidebar_popular_albums" />

    <xen:include template="xfr_useralbums_sidebar_most_active_members" />

    <div class="section UserAlbumsSidebar UserAlbumsSidebarStats">
        <div class="secondaryContent">
            <h3>{xen:phrase xfr_useralbums_statistics}</h3>

            <div class="pairsJustified">
                <dl>
                    <dt>{xen:phrase xfr_useralbums_stats_albums}</dt>
                    <dd>{xen:number $stats.albumsCount}</dd>
                </dl>
                <dl>
                    <dt>{xen:phrase xfr_useralbums_stats_images}</dt>
                    <dd>{xen:number $stats.imagesCount}</dd>
                </dl>
                <dl>
                    <dt>{xen:phrase xfr_useralbums_stats_comments}</dt>
                    <dd>{xen:number $stats.commentsCount}</dd>
                </dl>
                <dl><dt>{xen:phrase xfr_useralbums_stats_album_owners}</dt>
                    <dd>{xen:number $stats.albumOwners}</dd></dl>
            </div>
        </div>
    </div>

    <xen:include template="sidebar_share_page">
        <xen:set var="$url">{xen:link 'canonical:useralbums'}</xen:set>
    </xen:include>
</xen:sidebar>

<div class="pageNavLinkGroup">
    <div class="linkGroup">
        <xen:if is="{$canCreateAlbum}">
            <a href="{xen:link useralbums/create}" class="callToAction"><span>{xen:phrase xfr_useralbums_create_own_album}</span></a>
        <xen:else />
            {xen:phrase xfr_useralbums_no_permission_to_create_album}
        </xen:if>
    </div>

    <xen:pagenav link="useralbums" linkdata="" linkparams="" page="{$page}" perpage="{$albumsPerPage}" total="{$totalAlbums}" />
</div>
 
Is it possible to import user albums from vBulletin with this resource? I had read that from another member's old thread but after installing this add-on I'm not seeing any associated import tool. Thanks
 
Does anyone know how to edit the breadcrumb trail? I want user albums to show up as home\members\albums.

Does anyone know how to exclude a member from the gallery list?
To change which tab this shows up in, go to /route/prefix/UserAlbums.php

Line 151 change $section to equal the tab you want.

Code:
        $section = 'members';
 
This is how we excluded our special user's albums from the main album list, thus making the gallery a separate entity from the rest of the albums. Most of the credit on this one goes to one of my users that developed most of the code here. Our special user's id is 1351, replace any instances of 1351 with your own special user's ID.

This snippet goes in Model\Albums.PHP, replace the existing function.
Code:
private function prepareFetchOptions(array $fetchOptions)
   {
     $selectFields = '';
     $joinTables = '';
     $conditions = '';
     $orderBy = '';
     if (!XfRu_UserAlbums_Permissions::canApproveUnapprove())
     {
       $conditions .= "album.moderation = 0";
     }
     if (!XfRu_UserAlbums_Permissions::canViewPrivateAlbums())
     {
       $glue = '';
       if (!empty($conditions))
       {
         $glue = ' AND ';
       }
       if (array_key_exists('userId', $fetchOptions) && $fetchOptions['userId'])
       {
         $conditions .= $glue."((album.album_type = 'public' OR album.album_type = 'global') OR (album.album_type = 'private' AND album.user_id = ".(int)$fetchOptions['userId']."))";
       } else {
         $conditions .= $glue."(album.album_type = 'public' OR album.album_type = 'global')";
       }
     }
     if (!XfRu_UserAlbums_Permissions::canViewEmptyAlbums())
     {
       $glue = '';
       if (!empty($conditions))
       {
         $glue = ' AND ';
       }
       if (array_key_exists('userId', $fetchOptions) && $fetchOptions['userId'])
       {
         $conditions .= $glue."(album.last_image_date > 0 OR (album.last_image_date = 0 AND album.user_id = ".(int)$fetchOptions['userId']."))";
       } else {
         $conditions .= $glue."album.last_image_date > 0";
       }
     } else {
       if (array_key_exists('showEmptyAlbums', $fetchOptions))
       {
         if (!$fetchOptions['showEmptyAlbums'])
         {
           $glue = '';
           if (!empty($conditions))
           {
             $glue = ' AND ';
           }
           $conditions .= $glue."album.last_image_date > 0";
         }
       }
     }
//     if (!empty($fetchOptions['conditions']))
//     {
//     }
     if (array_key_exists('excludeUserId', $fetchOptions) && $fetchOptions['excludeUserId'])
     {
       $glue = '';
       if (!empty($conditions))
       {
         $glue = ' AND ';
       }
(int)$fetchOptions['excludeUserId'].")";
       $conditions .= $glue."(album.user_id <> ".(int)$fetchOptions['excludeUserId'].")";
     }
     if (array_key_exists('join', $fetchOptions))
     {
       if ($fetchOptions['join'] & self::FETCH_USER)
       {
         $selectFields .= ',
           user.*';
         $joinTables .= '
           LEFT JOIN xf_user AS user ON
             (user.user_id = album.user_id)';
       } else if ($fetchOptions['join'] & self::FETCH_AVATAR) {
         $selectFields .= ',
           user.avatar_date, user.gravatar';
         $joinTables .= '
           LEFT JOIN xf_user AS user ON
             (user.user_id = album.user_id)';
       }
     }
     if (!empty($fetchOptions['order']))
     {
       $order = array();
      foreach ($fetchOptions['order'] as $field => $dir)
      {
        $order[] = $field." ".$dir;
      }
      $orderBy = 'ORDER BY '.implode(', ', $order);
      unset($order);
     }
    return array(
      'selectFields' => $selectFields,
      'joinTables' => $joinTables,
      'conditions' => $conditions,
      'orderBy' => $orderBy
    );
   }

This code should go in ControllerPublic\Albums.PHP. It should replace the current function of the same name.

Code:
public function actionIndex()
    {
        $this->assertViewAlbums();

        $page = max(1, $this->_input->filterSingle('page', XenForo_Input::UINT));
        $albumsPerPage = XenForo_Application::get('options')->XfRu_UA_albumsPerPage;

        $this->canonicalizeRequestUrl(
            XenForo_Link::buildPublicLink('useralbums', null, array('page' => $page))
        );

        /* @var $albumsModel XfRu_UserAlbums_Model_Albums */
        $albumsModel = $this->getAlbumsModel();
        $imagesModel = $this->getImagesModel();
        $commentsModel = $this->getCommentsModel();

        $albumsModel->doSmth();

        $visitor = XenForo_Visitor::getInstance();

        $canEditAlbums = XfRu_UserAlbums_Permissions::canEditAlbumsByAnyone();

        $fetchOptions = array(
//            'conditions' => array(
//            ),
            'join' => XfRu_UserAlbums_Model_Albums::FETCH_USER,
            'order' => array('album.last_image_date' => 'DESC', 'album.createdate' => 'DESC'),
            'perPage' => $albumsPerPage,
            'page' => $page,
            'userId' => $visitor->getUserId(),
            'showEmptyAlbums' => XenForo_Application::get('options')->XfRu_UA_emptyAlbumsAtMainList,
                  'excludeUserId' => 1351
        );

        /** @var XenForo_Model_DataRegistry $cacheModel  */
        $cacheModel = XenForo_Model::create('XenForo_Model_DataRegistry');
        $userAlbumsCache = $cacheModel->get('userAlbums');

        if (!$userAlbumsCache)
        {
            $userAlbumsCache = $this->getCountersModel()->rebuildAlbumsCache($fetchOptions);
        }

//        $totalAlbums = $albumsModel->countAlbums(null, $fetchOptions);
        $totalAlbums = $userAlbumsCache['totalAlbums'];

        $this->canonicalizePageNumber($page, $albumsPerPage, $totalAlbums, 'useralbums');

        $albums = $albumsModel->getAlbums($fetchOptions);

        foreach ($albums as &$a)
        {
            $a['canEditAlbum'] = $canEditAlbums;
            $a = $albumsModel->prepareAlbum($a);
            if ($a['last_image_id'])
            {
                $a['image'] = array(
                    'thumbnailUrl' => $imagesModel->getImageThumbnailUrl(array('data_id' => $a['image_data_id'], 'file_hash' => $a['image_file_hash'])),
                    'image_id' => $a['last_image_id'],
                    'title' => $a['last_image_filename']
                );
            }
        }

//        $counters = $this->getCountersModel()->getStatistics();

        $stats = array(
            'albumsCount' => $totalAlbums,
            'imagesCount' => $userAlbumsCache['images'],
            'commentsCount' => $userAlbumsCache['comments'],
            'albumOwners' => $userAlbumsCache['members'],
            'activeMembers' => $userAlbumsCache['activeMembers']
        );

        $viewParams = array(
            'albums' => $albums,
            'canCreateAlbum' => XfRu_UserAlbums_Permissions::canCreateAlbum(),
            'page' => $page,
            'albumStartOffset' => ($page - 1) * $albumsPerPage + 1,
            'albumEndOffset' => ($page - 1) * $albumsPerPage + count($albums) ,
            'albumsPerPage' => $albumsPerPage,
            'totalAlbums' => $totalAlbums,
            'recentComments' => $commentsModel->getRecentComments(),
            'stats' => $stats,
            'popularAlbums' => $albumsModel->getPopularAlbums(),
        );

        if (XenForo_Application::get('options')->XfRu_UA_listType == 'grid')
        {
            $tpl = 'xfr_useralbums_albums_list_grid';

        } else {
            $tpl = 'xfr_useralbums_albums_list';
        }

        return $this->responseView(
            'XfRu_UserAlbums_ViewPublic_ListUserAlbums',
            $tpl,
            $viewParams
        );
    }
 
And another tweak to further separate the Gallery user from the albums. This time for the breadcrumb when called in galleries-- we don't want it to show the album owner, only the album.

Replace getBreadCrumbs in Model\Albums.PHP with this:

Code:
public function getBreadCrumbs(array $user, $album = array())
    {
        $breadCrumbs = array();

        // This needs to match the 'special' user's id.
        $galleryUser = 1351;

        if (($user['user_id'] != $galleryUser)
        or (!empty($album) and $album['user_id'] != $galleryUser))
        {
            $breadCrumbs['user_'.$user['user_id']] = array(
                    'href' => XenForo_Link::buildPublicLink('full:useralbums/list', $user),
                    'value' => new XenForo_Phrase('xfr_useralbums_xs_albums', array('name' => $user['username'])),
            );
        }

        if (!empty($album))
        {
            $breadCrumbs[$album['album_id']] = array(
                    'href' => XenForo_Link::buildPublicLink('full:useralbums/view', $album),
                    'value' => XenForo_Helper_String::censorString($album['title'])
            );
        }

        return $breadCrumbs;
    }

Place this code in your templates (only needed in the xfr_useralbums_image_view and xfr_useralbums_add_images templates):

Code:
<!-- Galleries -->
<xen:if is="{$album.user_id} == 1351">

<xen:navigation>
        <xen:breadcrumb href="http://firewoodhoardersclub.com/forums/index.php?gallery">Galleries</xen:breadcrumb>
        <xen:breadcrumb source="$breadCrumbs" />
</xen:navigation>
<xen:else />
<xen:navigation>
        <xen:breadcrumb href="http://firewoodhoardersclub.com/forums/index.php?useralbums/">Albums</xen:breadcrumb>
        <xen:breadcrumb source="$breadCrumbs" />
</xen:navigation>
</xen:if>
<!-- End Galleries -->
 
And a couple more small tweaks, still separating the galleries from the albums.

In xfr_useralbums_album_view replace current <xen description with something like this.
Code:
<xen:if is="{$album.user_id} == 1351">

<xen:description>
Firewood Hoarders Club Gallery
</xen:description>

<xen:else />

<xen:description>
    {xen:phrase xfr_useralbums_album_created_by_x_date_y,
        'name={xen:helper username, $album}',
        'date=<a href="{xen:link useralbums/view, $album}">{xen:datetime $album.createdate, html}</a>'}
</xen:description>

Same in xfr_useralbums_album_view
Code:
<xen:if is="{$album.user_id} == 1351">

<xen:description>
Firewood Hoarders Club Gallery
</xen:description>

<xen:else />

<xen:description>
    {xen:phrase xfr_useralbums_album_created_by_x_date_y,
        'name={xen:helper username, $album}',
        'date=<a href="{xen:link useralbums/view, $album}">{xen:datetime $album.createdate, html}</a>'}
</xen:description>

</xen:if>

And in xfr_useralbums_member_albums_list_grig replace the <xen:title> code with something like this.
Code:
<!-- Galleries Title -->
<xen:if is="{$user.user_id} == 1351">

<xen:title>FHC Member Galleries</xen:title>
<description>Upload Your Best Images</description>
<xen:else />

<xen:title>{xen:phrase xfr_useralbums_xs_albums, 'name={$user.username}'}</xen:title>
</xen:if>
<!-- End Galleries Title -->
 
To eliminate the username and avatar from the Gallery page, edit xfr_useralbums_member_albums_list_grig
Down at the bottom you will see code for the album username and for avatar (the last lines before the /xen:if in the next two snippets). Replace those lines with the snippets below (remember to replace 1351 with the user ID for the member hosting the gallery.

Code:
<xen:if is="{$user.user_id} == 1351">
            <xen:else />
               
                <a href="{xen:link "full:useralbums/list", $album}" title="{xen:phrase xfr_useralbums_album_owner}" class="">{$album.username}</a>,

            </xen:if>

Code:
</div>
           
            <xen:if is="{$user.user_id} == 1351">
            <xen:else />
           
            <xen:avatar user="$album" size="s" img="true" class="miniMe" title="{$album.username}" />
       
            </xen:if>
 
I got lazy on the last one and just completely duplicated the existing text and then edited it to my liking and wrapped and if statement around the whole thing. Anyway, this one makes who uploaded the image more obvious when in the galleries.

Replace the entire text of the xfr_useralbums_image_view template with this (remember to use the proper userID instead of 1351):
Code:
<xen:if is="{$album.user_id} == 1351">

<div id="image-{$image.image_id}">
        <xen:if hascontent="true">
        <div class="descriptionUserBlock">
            <div class="avatarHolder">
                <xen:avatar user="$image" size="s" title="{$image.username}" class="Tooltip" />
            </div>
            <span class="arrow"><span></span></span>
        </div>
        <div class="descriptionInfo">
            <div class="descriptionContent">
                <article><blockquote class="messageText ugc baseHtml">
                    <xen:contentcheck>
                    {xen:raw $image.descriptionHtml}
                    </xen:contentcheck>
                </blockquote></article>

            </div>
        </div>
        </xen:if>




<xen:if is="{$visitor.user_id} AND !{$isOverlay}"><a href="{xen:link 'useralbums/report-image', $image}" class="item control report OverlayTrigger" data-cacheOverlay="false">{xen:phrase report}</a></xen:if>
<div class="PublicControls">
                <xen:if is="{$canLikeImage}">
                    <a href="{xen:link useralbums/like-image, $image}" class="LikeLink {xen:if $image.like_date, unlike, like}" data-container="#likes-image-{$image.image_id}"><span></span><span class="LikeLabel">{xen:if $image.like_date, {xen:phrase unlike}, {xen:phrase like}}</span></a>
                </xen:if>
            </div>
        <div class="descriptionMeta">               
            <div class="PrivateControls">
                <font size="4"><span class="item muted">
                    Uploaded by </font><font size="4"><b><xen:username user="$image" class="author" /></b>
                </span></font>
            </div>
        </div>

<div id="likes-image-{$image.image_id}">
            <xen:if is="{$image.likes}">
                <xen:include template="xfr_useralbums_image_likes_summary">
                    <xen:set var="$likesUrl">{xen:link useralbums/likes-image, $image}</xen:set>
                </xen:include>
            </xen:if>
        </div>

    </div>

<xen:else />

<div id="image-{$image.image_id}">
        <xen:if hascontent="true">
        <div class="descriptionUserBlock">
            <div class="avatarHolder">
                <xen:avatar user="$image" size="s" title="{$image.username}" class="Tooltip" />
            </div>
            <span class="arrow"><span></span></span>
        </div>
        <div class="descriptionInfo">
            <div class="descriptionContent">
                <article><blockquote class="messageText ugc baseHtml">
                    <xen:contentcheck>
                    {xen:raw $image.descriptionHtml}
                    </xen:contentcheck>
                </blockquote></article>

            </div>
        </div>
        </xen:if>

        <div class="descriptionMeta">
            <div class="PrivateControls">
                <span class="item muted">
                    <xen:username user="$image" class="author" />,
                    <a href="{xen:link useralbums/view-image, $image}" title="{xen:phrase permalink}" class="datePermalink"><xen:datetime time="$image.image_date" /></a>
                </span>

                <xen:if is="{$visitor.user_id} AND !{$isOverlay}"><a href="{xen:link 'useralbums/report-image', $image}" class="item control report OverlayTrigger" data-cacheOverlay="false">{xen:phrase report}</a></xen:if>
            </div>

            <div class="PublicControls">
                <xen:if is="{$canLikeImage}">
                    <a href="{xen:link useralbums/like-image, $image}" class="LikeLink {xen:if $image.like_date, unlike, like}" data-container="#likes-image-{$image.image_id}"><span></span><span class="LikeLabel">{xen:if $image.like_date, {xen:phrase unlike}, {xen:phrase like}}</span></a>
                </xen:if>
            </div>
        </div>

        <div id="likes-image-{$image.image_id}">
            <xen:if is="{$image.likes}">
                <xen:include template="xfr_useralbums_image_likes_summary">
                    <xen:set var="$likesUrl">{xen:link useralbums/likes-image, $image}</xen:set>
                </xen:include>
            </xen:if>
        </div>

    </div>
   
    </xen:if>

And that's all we've got so far. We are currently working on getting the image uploader's name beneath the image thumbnail when in the gallery album view. To be continued...
 
To add user information under image thumbnails when in a Gallery (see above posts if you don't know what I mean by gallery) we must first make some modifications in the model, allowing the $image variable to be used.

In Model\Images.PHP, replace this function:
Code:
public function getImagesByAlbumId($contentIds, $albumType = null)
    {
        if (!is_array($contentIds))
        {
            $contentIds = array($contentIds);
        }

        $userCriteria = '';
        if ($albumType == 'global' && !XfRu_UserAlbums_Permissions::canEditAlbumsByAnyone())
        {
            $userCriteria = ' AND data.user_id = ' . XenForo_Visitor::getUserId();
        }
      
        return $this->fetchAllKeyed('
            SELECT `image`.*,
                ' . self::$dataColumns . ',
                `user`.user_id as user_id, `user`.username as username, `user`.avatar_date, `user`.gravatar
            FROM xfr_useralbum_image AS `image`
            INNER JOIN xfr_useralbum_image_data AS `data` ON
                (`data`.data_id = `image`.data_id)
            INNER JOIN xf_user AS `user` ON (`user`.user_id = `data`.user_id)
            WHERE `image`.album_id IN (' . $this->_getDb()->quote($contentIds) . ')'. $userCriteria .'
            ORDER BY `image`.album_id, `image`.image_date
        ', 'image_id');
    }

Next edit the xfr_useralbums_images_list template like below:

Code:
<ol class="thumbnailList">
<xen:foreach loop="$images" value="$image">
    <li class="thumbnailHolder">
        <div class="boxModelFixer primaryContent">
            <div class="thumbnail">
                <a id="image-{$image.image_id}" href="{xen:link useralbums/view-image, $image}" class="xfrIbTrigger-x thumbBox" data-href="{xen:link useralbums/imagebox, $image}">
                    <img src="{$image.thumbnailUrl}" alt="{$image.filename}"/>
                </a>
            </div>              
               
            <div class="infobar">
                <span class="item Tooltip comments" title="{xen:phrase xfr_useralbums_image_comments}">{$image.comment_count}</span>
                <span class="item Tooltip views" title="{xen:phrase xfr_useralbums_image_views}">{$image.view_count}</span>
                <span class="item Tooltip likes" title="{xen:phrase xfr_useralbums_image_likes}">{$image.likes}</span>
            </div>

<!-- Begin edit -->
            <xen:if is="{$album.user_id} == 1351">
<div class="posterDate muted"><center><table width="100%"><tr><td><font size="2">{$image.username}<br><span class=faint>Upload Date:</span><br><xen:datetime time="$image.image_date" /></font></td><td align="right"><xen:avatar user="$image" size="s" img="true" class="miniMe" title="{$image.username}" /></td></tr></table></center></div>
       
</xen:if>
<!-- Edit End -->

        </div>
    </li>
</xen:foreach>
</ol>
 

Attachments

  • Screenshot from 2014-10-19 00:40:51.webp
    Screenshot from 2014-10-19 00:40:51.webp
    102.3 KB · Views: 21
Hi!
Here is modified js file, that fixes popup bug, described before.
Just unpack it to the 'js/xfru/useralbums' folder.
Thank you! Still a bit buggy but works better than before.

Not sure how to explain the bug but I guess you can test it for yourself HERE .

From what I see is that it works on the initial image you click and can cycle through but if you say exit out the popup and then try to click a new image does not load it, you would have to select the first image you selected on page load or reload the page.

EDIT:

I also do not see how this fixes the described bug above

PHP:
            var $target = $(e.target), dataSource = $target.attr('href') || $target.data('href');
            this.setData($target);
            this.updateLICounter($target.attr('baseURI') + dataSource);
        },

        updateLICounter: function(url)
        {
            console.log('updateLICounter URL: %s', url);
            var liCounter = new Image(1,1);
            liCounter.src = '//counter.yadro.ru/hit?r='
                + ((typeof(screen)=='undefined') ? '' : ';s'
                + screen.width + '*' + screen.height + '*'
                + (screen.colorDepth ? screen.colorDepth : screen.pixelDepth))
                + ';u' + escape(url + '?target=lightbox')
                + ';h' + escape(document.title.substring(0,80))
                + ';' + Math.random()
                ;

I may be missing something but care to elaborate?

If you do not mind. :)
 
Last edited:
It's not my script.
I've got it on one popular forum, and I've used it for my forum.
All works perfectly. I can open an image, scroll images in the popup window, close popup, and open another image.

Sorry, if in your case something works wrong.
But you can modify this script yourself, if you want.

I think that updateLICounter is unnecessary, you can delete it.
 
Last edited:
I've removed this function (updateLICounter), all still works well.
Maybe there are other unnecessary code in this script, I don't know. Try to remove something, if you want.

Here is new script.
 

Attachments

Nice app. Would be nice if you could link images from imgur/flickr/picasa/etc. Would certainly be willing to pay for the add-on if this feature was added.
 
Top Bottom