Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
New Latest Album Pictures - Forum Home Details »»
New Latest Album Pictures - Forum Home
Version: 1.00, by Atakan KOC Atakan KOC is offline
Developer Last Online: Mar 2023 Show Printable Version Email this Page

Category: Forum Home Enhancements - Version: 4.0.0 Beta 3 Rating:
Released: 11-21-2009 Last Update: Never Installs: 799
DB Changes Uses Plugins Template Edits Auto-Templates
Re-useable Code Translations  
No support by the author.

NEW Latest Album Pictures - Forum Home

It shows the pictures added to the albums on the main page. It shows only the public mentioned files. If not shows the reasons are: vbulletin settings show albums must be enabled.

The user grup that owns the pictures must be enabled show picture setting. Or there is no picture to show.

Additionally you can slect the number of pictures that can be shown.

Hope it works for you as I like it very much.

install

Go to your admin cp, then:
Plugin System -> Manage Products -> [Add/Import Product] -> Select 'product-newalbum.xml' from your computer then press 'Import'

Modifications Info

Plugin : 2
Phrases : 9
Template : 2
Setting : 3
Query : 1 Query

Latest Posts Setting

Go to your admin cp, then:
vBulletin Options -> New Album Picture ->

Versions:
v1.0 -First release

Download Now

File Type: xml product-newalbum.xml (5.6 KB, 4356 views)

Screenshots

File Type: jpg vB4 Forums_1258911725166.jpg (59.3 KB, 0 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
2 благодарности(ей) от:
alhidaya, Toorak Times

Comments
  #432  
Old 05-29-2012, 01:23 PM
CharlieDelta CharlieDelta is offline
 
Join Date: Apr 2010
Posts: 616
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I see the code. I highlighted it in red for you.
If you have custom styles you have to make the template edits in all styles.

Quote:
Originally Posted by Chadi View Post
I don't see this in plugin manager > New Album Picture Forum Home (there are 2 of these), none have those codes

the cache template one has only

Code:
if (THIS_SCRIPT == "index")
{
// global $cache;
$cache[] = 'newalbum_picture';
$cache[] = 'newalbum_print';
}
forumhome_start has

Code:
if (
    (
        $vbulletin->options['socnet'] & $vbulletin->bf_misc_socnet['enable_albums']
        AND
        $permissions['genericpermissions'] & $vbulletin->bf_ugp_genericpermissions['canviewmembers']
        AND
        $permissions['albumpermissions'] & $vbulletin->bf_ugp_albumpermissions['canviewalbum']
        AND
        $vbulletin->options['new_enable_albums']
    )
)
{
  $displayrecords = ($vbulletin->options['new_afm_sayi'] ? $vbulletin->options['new_afm_sayi'] : 4);
    switch ($vbulletin->options['new_afm_dt'])
    {
      case 1: 
      $sorgu = "ORDER BY dateline DESC LIMIT 0, $displayrecords";
      $resimlery = $vbphrase['new_afm_sec5'];
      break;
      case 2: 
      $sorgu = "ORDER BY rand(NOW()) DESC LIMIT 0, $displayrecords";
      $resimlery = $vbphrase['new_afm_sec6'];
      break;
    }  
  $lpictures = $db->query("
  SELECT albumpicture.*, album.*, user.username, user.usergroupid,
  IF(displaygroupid=0, user.usergroupid, displaygroupid) AS displaygroupid 
  FROM " . TABLE_PREFIX . "attachment AS albumpicture
  LEFT JOIN " . TABLE_PREFIX . "album AS album ON(album.albumid = albumpicture.contentid)
  LEFT JOIN " . TABLE_PREFIX . "user AS user ON(user.userid = album.userid)
  WHERE album.state = 'public' and albumpicture.contenttypeid = 8
  $sorgu  
  ");
  if ($db->num_rows($lpictures))
  {
    while ($lpicture = $db->fetch_array($lpictures))
    {
    $lpicture['musername'] = fetch_musername($lpicture);
    $lpicture['title'] = trim(strip_quotes($lpicture['title']));
    // eval('$resimler .= "' . fetch_template('afm_picture') . '";');
    $templater_x1 = vB_Template::create('newalbum_picture');
    $templater_x1->register('lpicture',$lpicture);
  $resimler .= $templater_x1->render();

    }
    
    $templater = vB_Template::create('newalbum_print');
    $templater->register('resimler',$resimler);
    $templater->register('resimlery',$resimlery);
    $template_hook['forumhome_wgo_pos2'] .= $templater->render();

  }
  $db->free_result($lpictures);
}

Even so, nothing shows up on my forumhome regardless
Reply With Quote
  #433  
Old 05-29-2012, 01:32 PM
Chadi's Avatar
Chadi Chadi is offline
 
Join Date: May 2004
Location: USA
Posts: 2,043
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks, did that and template edits but still nothing shows up
Reply With Quote
  #434  
Old 05-29-2012, 01:35 PM
CharlieDelta CharlieDelta is offline
 
Join Date: Apr 2010
Posts: 616
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Does anyone have albums uploaded? It won't show any pictures until you do.
Reply With Quote
  #435  
Old 05-29-2012, 03:08 PM
Chadi's Avatar
Chadi Chadi is offline
 
Join Date: May 2004
Location: USA
Posts: 2,043
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by mobe00 View Post
I did some changes in my coding here to get the result i wanted

Replace the templates with the following code.

Template Newalbum_print

Code:
<div id="test" class="block collapse">
    <h3 class="blockhead">
         <b>{vb:raw resimlery}</b>
        <a class="collapse" id="collapse_album_content" href="{vb:raw relpath}#top"><img src="{vb:stylevar imgdir_button}/collapse{vb:raw vbcollapse.collapseimg_album_content_img}_40b.png" alt="{vb:rawphrase collapse_this_category}" /></a>
    </h3>

    <div id="album_content" class="childforum forumbit_post">
        <div class="forumrow table" style="padding-right:0px">
            <table class="block" cellpadding="6" cellspacing="6" border="0" width="100%" align="center">
<br />
                <tr>
                    {vb:raw resimler}
                </tr>
            </table>
<br />
        </div>
    </div>
</div>
Template Newalbum_picture

Code:
 <td align="center">    
        <a class="picture" href="album.php?albumid={vb:raw lpicture.albumid}&amp;attachmentid={vb:raw lpicture.attachmentid}"><img  src="attachment.php?attachmentid={vb:raw lpicture.attachmentid}&amp;thumb=1&amp;d=1258906442" alt="269" border="0" /></a>
<br />
<a href="member.php?u={vb:raw lpicture.userid}">{vb:raw lpicture.musername}</a> 
<br />
{vb:raw lpicture.title}
</td>
In pluginmanager - find New Album Picture Forum Home

find the code

Code:
$template_hook['forumhome_wgo_pos1'] .= $templater->render();
and change it with

Code:
$template_hook['forumhome_above_forums'] .= $templater->render();
And voila ..you got this

I tried this again on a forum home album mod using your code

I have it set as

Code:
<div class="vbcat">
        <div class="vbcat_left">
            <div class="vbcat_right">
        <a class="collapse" id="collapse_album_content" href="{vb:raw  relpath}#top"><img src="{vb:stylevar  imgdir_button}/collapse{vb:raw  vbcollapse.collapseimg_album_content_img}_40b.png" alt="{vb:rawphrase  collapse_this_category}" /></a>
            </div>
        </div>
    </div>
    <div id="album_content" class="childforum forumbit_post">
        <div class="forumrow table" style="padding-right:0px">
            <table class="block" cellpadding="6" cellspacing="6" border="0" width="100%" align="center">
<br />
                <tr>
                    {vb:raw resimler}
                </tr>
            </table>
<div class="vbcat_bottom"><div  class="vbcat_bottom_left"><div  class="vbcat_bottom_right"></div></div></div>
</div>
</div>
But, this is how it appears




Noticed few problems:

its not properly aligned with sideblock
the collapse button, that row/table section is not properly widened to rest of table.
footer of table, extra purple row?

Thanks in advance.
Reply With Quote
  #436  
Old 05-30-2012, 01:08 AM
Chadi's Avatar
Chadi Chadi is offline
 
Join Date: May 2004
Location: USA
Posts: 2,043
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Got the template working, Just a question - how can I insert this in a custom location? I tried copying the newalbum_picture template into a custom forumhome spot and this is all it outputs:

THis is the entire code I'm using in forumhome, for the 2 columned table for my shoutbox and this gallery

Code:
    <div class="vbcat">
        <div class="vbcat_left">
            <div class="vbcat_right">
        <a class="collapse" id="collapse_shoutbox" href="{vb:raw relpath}#top"><img src="{vb:stylevar imgdir_button}/collapse{vb:raw vbcollapse.collapseimg_album_content_img}_40b.png" alt="{vb:rawphrase collapse_this_category}" /></a>
            </div>
        </div>
    </div>
        <table border="0" width="100%" align="center" columns="2">
            <tr>
                <td>
                    <div id="shoutbox">
                        <iframe frameborder="0" style="height: 185px; overflow:auto; width: 95%" src="http://www.cbox.ws/box/?boxid=439&boxtag=7868&sec=main" name="cboxmain" id="cboxmain" seamless="seamless" scrolling="auto" frameborder="0"></iframe>
                        <iframe frameborder="0" width="95%" height="55" src="http://www.cbox.ws/box/?boxid=439&boxtag=7868&sec=form&wmsg=350&nme=$cbox _nme&nmekey=$cbox_key" marginheight="1" marginwidth="1" scrolling="no" allowtransparency="yes" name="cboxform" id="cboxform"></iframe>
                    </div>
                </td>
                <td align="center">
                    <a class="picture" href="album.php?albumid={vb:raw lpicture.albumid}&amp;attachmentid={vb:raw lpicture.attachmentid}">
                    <img  src="attachment.php?attachmentid={vb:raw lpicture.attachmentid}&amp;thumb=1&amp;d=1258906442" alt="Front Range 4x4 Member Rig" style="border:1px solid #ddd;background:white;padding:4px;-webkit-box-shadow:0px 2px 2px rgba(0,0,0,0.8);-moz-box-shadow:0px 2px 2px rgba(0,0,0,0.8);box-shadow:0px 2px 2px rgba(0,0,0,0.8);border-image:initial;"/>
                    </a>
                    <br />
                    <a href="member.php?u={vb:raw lpicture.userid}">
                    {vb:raw lpicture.musername}
                    </a> 
                </td>
            </tr>
        </table>
    <div class="vbcat_bottom"><div class="vbcat_bottom_left"><div class="vbcat_bottom_right"></div></div></div>
Attached Images
File Type: png snip.PNG (6.3 KB, 0 views)
Reply With Quote
  #437  
Old 05-30-2012, 09:23 AM
Bisha's Avatar
Bisha Bisha is offline
 
Join Date: Mar 2006
Posts: 102
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Anyone have the modification for thumbnails??
Thank you!
Reply With Quote
  #438  
Old 05-31-2012, 03:45 AM
Toorak Times's Avatar
Toorak Times Toorak Times is offline
 
Join Date: Jan 2011
Posts: 436
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Works fine in my Fluid skins but breaks the Fixed skins up. Is there any fix or is this mod for Fluid skins only?
Reply With Quote
  #439  
Old 06-01-2012, 02:57 PM
silpher silpher is offline
 
Join Date: Nov 2010
Posts: 23
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

how to put this on the TOP of Forum Home?
Reply With Quote
  #440  
Old 06-01-2012, 04:28 PM
Videx's Avatar
Videx Videx is offline
 
Join Date: Feb 2007
Posts: 3,085
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by silpher View Post
how to put this on the TOP of Forum Home?
This is a common request, but despite telling people to search for the answer nobody recently has come back with the link so I went looking myself. It was only slightly more difficult than simply searching for "top".

https://vborg.vbsupport.ru/showpost....&postcount=120

Obviously you won't want to use the file as it's so old, but I sure hope someone tries the edit and reports back if it still works. Mine's still at the top in 4.1.8 and this must have been the way I got it there.
Reply With Quote
  #441  
Old 06-02-2012, 02:12 PM
Chadi's Avatar
Chadi Chadi is offline
 
Join Date: May 2004
Location: USA
Posts: 2,043
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

How can I place this in a custom area?
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 12:32 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.14172 seconds
  • Memory Usage 2,363KB
  • Queries Executed 26 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (8)bbcode_code
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (2)post_thanks_box_bit
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (3)postbit_attachment
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete