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
Latest Album Picture v2 Details »»
Latest Album Picture v2
Version: 0.3, by Massamo Massamo is offline
Developer Last Online: Apr 2022 Show Printable Version Email this Page

Category: vBulletin CMS Widgets - Version: 4.0.3 Rating:
Released: 12-13-2009 Last Update: Never Installs: 63
Template Edits
Re-useable Code Translations Is in Beta Stage  
No support by the author.

Create a new widget
Widget Type: PHP Direct Execution
Title: Latest Picture

Then save find it again and click the configure change top box to
Code:
global $db;

// set how many to display
$hm = '1';

// replace dateline below with rand(NOW()) if you want it random
$orderby = "dateline";


$lpictures = $db->query_read("
  SELECT *  FROM " . TABLE_PREFIX . "attachment AS attach
    WHERE attach.state = 'visible' and attach.contenttypeid = '1'
ORDER BY $orderby DESC LIMIT 0, $hm
  ");

    $cols = $db->num_rows($lpictures);

    while ($lpicture = $db->fetch_array($lpictures))
    {
    
$templater = vB_Template::create('cms_albums_albumsbits');
$templater->register('lpicture' , $lpicture);
$albumpics .= $templater->render();

$templater = vB_Template::create('cms_albums');
$templater->register('lpicture' , $lpicture);
$templater->register('albumpics' , $albumpics);
$cms_albums = $templater->render();

    }
$output = $cms_albums;
Then save

add 2 new templates below

Title: cms_albums
Code:
    <link rel="stylesheet" type="text/css" href="css.php?styleid=1&amp;langid=1&amp;d=1260794007&amp;td=ltr&amp;sheet=album.css" />

    <link rel="stylesheet" type="text/css" href="css.php?styleid=1&amp;langid=1&amp;d=1260794007&amp;td=ltr&amp;sheet=picture.css" />

<div class="block" id="album">
    <ol id="thumbnails" class="blockbody floatcontainer">
        $albumpics
</ol>    
</div>
Title: cms_albums_albumsbits
Code:
<li>

    <center><a class="picture" href="$vboptions[bburl]/attachment.php?attachmentid=$lpicture[attachmentid]"><img src="$vboptions[bburl]/attachment.php?attachmentid=$lpicture[attachmentid]" alt="$lpicture[caption]" border="0" height="100" width="200"  /></a></center>
</li>
all you need to do now is go into layout manager and add the widget where you want it

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #32  
Old 02-05-2010, 10:54 PM
dancop dancop is offline
 
Join Date: Jan 2009
Posts: 5
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is there a way to limit the widget to pull the pictures from the given album only not from all the albums?
Reply With Quote
  #33  
Old 02-06-2010, 01:58 AM
Juggernaut Juggernaut is offline
 
Join Date: Dec 2009
Location: California
Posts: 589
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes the pictures are to small, but otherwise this is a good widget
Reply With Quote
  #34  
Old 02-06-2010, 05:38 PM
dodgechargerfan dodgechargerfan is offline
 
Join Date: Aug 2005
Posts: 94
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I like this a lot but I am seeing the same problem as others - the picture is smaller than the box so there's a lot of white background to look at.
Reply With Quote
  #35  
Old 02-07-2010, 12:08 AM
Bergler Bergler is offline
 
Join Date: Dec 2006
Posts: 114
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Like this,
Attached Images
File Type: jpg latest picture.jpg (34.5 KB, 0 views)
Reply With Quote
  #36  
Old 02-07-2010, 02:02 AM
Bergler Bergler is offline
 
Join Date: Dec 2006
Posts: 114
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Bergler View Post
Like this,
How do you fix that?
Reply With Quote
  #37  
Old 02-07-2010, 07:23 AM
Moondust Moondust is offline
 
Join Date: Jan 2010
Posts: 36
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I need the last 6 Pictures from ALL Pictures on my Forum.... and display it in the Forumhome under the Navbar.... please code this... many People miss this Addon :-)
Reply With Quote
  #38  
Old 02-07-2010, 07:36 AM
Moondust Moondust is offline
 
Join Date: Jan 2010
Posts: 36
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Its not work in 4.0.1 ? Only the Date see, but not a Picture.
Reply With Quote
  #39  
Old 02-07-2010, 07:45 AM
Juggernaut Juggernaut is offline
 
Join Date: Dec 2009
Location: California
Posts: 589
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

^^ It does work on 4.0.1, I have it in my forum, butthis is only for the homepage, it's not
for the navbar, you want New Album Picture Forum Home mod for that.
Reply With Quote
  #40  
Old 02-07-2010, 03:37 PM
Moondust Moondust is offline
 
Join Date: Jan 2010
Posts: 36
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Destron View Post
^^ It does work on 4.0.1, I have it in my forum, butthis is only for the homepage, it's not
for the navbar, you want New Album Picture Forum Home mod for that.
This Widget is for the CMS, really... but is not work... show only the Date from today.


I am search a Mod for all Pictures, not only the Album Pictures :-)
Reply With Quote
  #41  
Old 02-07-2010, 04:18 PM
Juggernaut Juggernaut is offline
 
Join Date: Dec 2009
Location: California
Posts: 589
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

<i>^^ You have to make the template edit as swell, after you create the widget.
Yes a mod for all pictures would be great, and it would be awesome to have
a mod like that.</i>
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 02:38 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04710 seconds
  • Memory Usage 2,329KB
  • 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
  • (3)bbcode_code
  • (2)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
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (1)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
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • postbit_attachment
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete