vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   vBulletin CMS Widgets - Latest Album Picture v2 (https://vborg.vbsupport.ru/showthread.php?t=230192)

merlin_de 12-19-2009 08:10 AM

Hello,
it works not in my cms. There is a Box with the title "Latest Picture", but without content. I have upload a new albumpicture, but nothing happens.
In the Template "cms_albums_almbumsbits" is a href to "album-picture.php". Where can i find this file ?
Greets,Micha

Allan 12-19-2009 08:16 AM

Do you have one screen please ?

merlin_de 12-19-2009 08:28 AM

Hello Allan,
many thanks for your answer. I can?t believe it: I had deleted the old (and incompatible) vB3 Styles in the ACP now, and it works:eek:. Maybee this will help other users who have problems with this nice widget.
However, here my screenshot from a working hack ;)

https://vborg.vbsupport.ru/external/2009/12/67.jpg

Greets,Micha

abroad 12-19-2009 10:01 AM

the pictures need to be larger...how is it possible to change it?

woffie 12-19-2009 11:12 AM

I get an error when I use this.

Fatal error: Call to a member function query_read() on a non-object in /home/myforums/public_html/myforums/forums/packages/vbcms/widget/execphp.php(171) : eval()'d code on line 6

AWMGolfer 12-19-2009 11:43 AM

Is there a way this can work on the new forum sidebar?

AndrewSpearin 12-19-2009 09:28 PM

Thanks for this, I was able to adapt it to suit a needed feature perfectly :)

http://npac.ca/2010

abroad 12-23-2009 07:55 AM

there is a problem with pictures which are set to private. Those are not displayed. The album is only displayed empty. They need to be filtered out.

Massamo 12-23-2009 09:00 AM

This will fix the problem updated first post too

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 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'
ORDER BY $orderby DESC LIMIT 0, $hm
  ");


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

    while ($lpicture = $db->fetch_array($lpictures))
    {
    $lpicture['musername'] = fetch_musername($lpicture);
    $lpicture['title'] = trim(strip_quotes($lpicture['title']));

   
$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;


abroad 12-23-2009 09:13 AM

thanks a lot!


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

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.01142 seconds
  • Memory Usage 1,735KB
  • 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
  • (1)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (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