Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 10-09-2008, 01:22 PM
jerx jerx is offline
 
Join Date: Feb 2006
Posts: 188
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Wrong album picture count - where is the album picture count stored?

I have imported many pictures from another mod to vb' s album. Unfortunately the album picture count is not correct, if a user has more than 1 picture. Eg "Picture 3 of 1 from Album AlbumName" (View Picture page).

I was not able to find the album count. I think that these are the only tables which are important for the pictures:

album
albumpicture
picture

picturecomment and picturecommenthash should be unimportant.

Or isn' t it stored in the database? How is the album picture count generated?

The template uses this to generate the text:
Code:
<phrase 1="$pic_location[pic_position]" 2="$albuminfo[picturecount]" 3="$albuminfo[title]">$vbphrase[picture_x_of_y_from_album_z]</phrase>
I think it might have been calculated incorrectly, because I had wrong values for creation date and last picture update for the album. Now I have correct values, but the problem persists. I have also tried to update the counters by setting a new max for the allowed picture quantity, but still no luck.

Can anybody please help me on this issue?
Reply With Quote
  #2  
Old 10-11-2008, 10:24 AM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

How did you import them?
Reply With Quote
  #3  
Old 10-13-2008, 01:02 PM
jerx jerx is offline
 
Join Date: Feb 2006
Posts: 188
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I imported the pictures manually by adjusting the old database table to suit vbulletins scheme. In the end I had generated three tables: vb_album, vb_albumpicture, vb_picture.

On a different thread concerning another import question (regarding picture comment hashs) you suggested using the datamanager. At that time I already imported the pictures. But it looked too complicated for me to use the datamanager. I only found the last two articles and I wasn' t able to understand their meaning.

Using the vBulletin Database Class
Creating Custom Datamanagers
Datamanagers: Objects as Data and Methods

Now I have read the first article. Although I was able to understand more than I did when reading the other articles, I have the impression that you need more knowledge about php and mysql. Since I know very little about it, it might be very difficult to adapt the articles to my import issues.
Reply With Quote
  #4  
Old 10-14-2008, 08:47 AM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The datamanagers would already take care of things like updating counters. As you manually inserted rows, you will need to update counters etc yourself, you also might be missing information. I suggest you start by asking at vB.com.
Reply With Quote
  #5  
Old 10-15-2008, 07:55 AM
jerx jerx is offline
 
Join Date: Feb 2006
Posts: 188
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I figured out why the counters have been wrong. I thought that the visible column in album table is for setting the visibility of an album, but it is the counter for the visible pictures. I corrected that column and the counter is displayed correctly now.

By the way, you won' t get any help at vb.com if you need information on non default features. Even if you only ask for help on understanding the default code, you will only be pointed to vb.org.
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 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.04814 seconds
  • Memory Usage 2,198KB
  • Queries Executed 13 (?)
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
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (5)post_thanks_box
  • (5)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (5)post_thanks_postbit_info
  • (5)postbit
  • (5)postbit_onlinestatus
  • (5)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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete