vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=235)
-   -   Forum Home Enhancements - Latest Album Pictures - Forum Home (https://vborg.vbsupport.ru/showthread.php?t=194827)

testbot 01-11-2010 04:06 PM

here's a quick dirty way to do it.

AdminCP> Styles & Templates> afm_picture
change to:

Code:

<td align="center">
<a href="album.php?albumid=$lpicture[albumid]&amp;pictureid=$lpicture[pictureid]">
<img title="$lpicture[title]" class="inlineimg" src="picture.php?pictureid=$lpicture[pictureid]&amp;albumid=$lpicture[albumid]&amp;thumb=1"  border="0" alt="$lpicture[title]" />
</a>
<br />
<a href="member.php?u=$lpicture[userid]">$lpicture[musername]</a>
<br />
$lpicture[title]
$tabler

AdminCP>Plugins & Products>Plugin Manager>Latest Album Picture
change to:

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['afm_onoff']
        )
)
{
  $displayrecords = ($vbulletin->options['afm_sayi'] ? $vbulletin->options['afm_sayi'] : 4);
    switch ($vbulletin->options['afm_dt'])
    {
      case 1: $sorgu = "ORDER BY dateline DESC LIMIT 0, $displayrecords"; break;
      case 2: $sorgu = "ORDER BY rand(NOW()) DESC LIMIT 0, $displayrecords"; break;
    } 
  $lpictures = $db->query("
  SELECT albumpicture.*, album.*, user.username, user.usergroupid,
  IF(displaygroupid=0, user.usergroupid, displaygroupid) AS displaygroupid
  FROM " . TABLE_PREFIX . "albumpicture AS albumpicture
  LEFT JOIN " . TABLE_PREFIX . "album AS album ON(album.albumid = albumpicture.albumid)
  LEFT JOIN " . TABLE_PREFIX . "user AS user ON(user.userid = album.userid)
  WHERE album.state = 'public'
  $sorgu 
  ");
  if ($db->num_rows($lpictures))
  {
        while ($lpicture = $db->fetch_array($lpictures))
        {
                $lpicture['musername'] = fetch_musername($lpicture);
                $lpicture['title'] = trim(strip_quotes($lpicture['title']));
               
                if ($pic_count >= 4){
                        $tabler = '</td></tr><tr>';
                        $pic_count = '';
                }else{                       
                        $tabler = '</td>';
                        $pic_count++;
                }               
                eval('$resimler .= "' . fetch_template('afm_picture') . '";');               
        }
    switch ($vbulletin->options['afm_yer'])
    {
      case 1: $vbulletin->templatecache['navbar'] .= $vbulletin->templatecache['afm_latestfm']; break;
      case 2: $vbulletin->templatecache['FORUMHOME'] = str_replace('<!-- main -->', '<!-- what\'s going on box -->'.$vbulletin->templatecache['afm_latestfm'], $vbulletin->templatecache['FORUMHOME']); break;
      case 3: $vbulletin->templatecache['FORUMHOME'] = str_replace('<!-- what\'s going on box -->', '<!-- end what\'s going on box -->'.$vbulletin->templatecache['afm_latestfm'], $vbulletin->templatecache['FORUMHOME']); break;
      case 4: $vbulletin->templatecache['FORUMHOME'] = str_replace('<!-- end what\'s going on box -->', '<!-- end what\'s going on box -->'.$vbulletin->templatecache['afm_latestfm'], $vbulletin->templatecache['FORUMHOME']); break;
    }
  }
  $db->free_result($lpictures);
}


shachar47 01-11-2010 07:55 PM

thanks man!

testbot 01-11-2010 08:20 PM

no problem. :D

it's always good to help each other out when we can.

DieselTruck 01-20-2010 01:31 AM

Quote:

Originally Posted by hyperspin (Post 1795618)
Great mod, but how would I go about having this to only pull random images from specific albums? I have a couple albums that I would like images to pull from instead of all albums...

What about EXCLUDING different albums? Anyway to add a button on each album to that only Moderators can check to exclude it from rotation.

giotis9 01-21-2010 04:54 PM

Thanks for the grate mod but I cant seem to make this work with my site. I cant even see the box for the images. I use vbull 3.8.4 fresh installation but there are some pics that I have edited. I have enabled albums I have even updated counters but nothing...

Can you please tell me what I am doing wrong and assist?

Thank you for our time.

LOKIN510051 01-27-2010 03:07 PM

perfecto gracias, me quedo muy bien

biggeorge 02-13-2010 04:27 PM

Installed and working in less than 2-mins. Thank you!

exposed 02-14-2010 02:08 AM

is there a way to use this with photopost Instead of the vb gallery?

afgboy 02-16-2010 08:21 AM

1 Attachment(s)
is it possible that the guest can see this too?

testbot 02-16-2010 02:44 PM

Quote:

Originally Posted by afgboy (Post 1983605)
is it possible that the guest can see this too?

guests must be able to view members AND albums in usergroup permissions.


All times are GMT. The time now is 08:27 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.01201 seconds
  • Memory Usage 1,745KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete