Announcement

Collapse
No announcement yet.

Making for more than 3 attachments here?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Mark.B
    replied
    Thanks Wayne, I've added a vote.
    This would be a useful option to have.

    Leave a comment:


  • Wayne Luke
    replied
    Originally posted by Mark.B View Post
    If you wish, you can make a small file edit to increase this number.
    Note that we cannot support file edits and you'll need to re-apply this after every upgrade.

    In this file:
    core/vb/library/content/gallery.php

    Find:
    PHP Code:
    $contentInfo[$node]['photopreview'] = ($contentInfo[$node]['photocount'] > 3) ? array_slice($contentInfo[$node]['photo'], 03) : $contentInfo[$node]['photo']; 

    Change to:
    PHP Code:
    $contentInfo[$node]['photopreview'] = ($contentInfo[$node]['photocount'] > 12) ? array_slice($contentInfo[$node]['photo'], 012) : $contentInfo[$node]['photo']; 

    Then find:
    PHP Code:
    $contentInfo[$nodes]['photopreview'] = ($contentInfo[$nodes]['photocount'] > 3) ? array_slice($contentInfo[$nodes]['photo'], 03) : $contentInfo[$nodes]['photo']; 

    Change to:
    PHP Code:
    $contentInfo[$nodes]['photopreview'] = ($contentInfo[$nodes]['photocount'] > 12) ? array_slice($contentInfo[$nodes]['photo'], 012) : $contentInfo[$nodes]['photo']; 

    Obviously that gives you 12...you can use whatever number you prefer.

    Created a JIRA to turn this value into an option. http://tracker.vbulletin.com/browse/VBV-13914

    Leave a comment:


  • keegmen
    replied
    Thank you !, the first thing I'll do will be upgraded to version 5.1.4 and then I tell if it works or not, ok!

    Leave a comment:


  • TLMD
    replied
    Originally posted by Glenn Vergara View Post
    It is recommended to change the icon sprites file (which contains all the icons used across the site) but that's not easy to do. Alternative solution is to override the background in css_additional.css template and specify individual icon image for each post status.
    This is definetly worth to be mentioned in the tutorials section of this forum! I have seen so many topics regarding how to change the icons in vB5 and I hope there will be an AdminCP option at some day...

    Thanks for sharing the CSS info Glenn!

    Leave a comment:


  • Mark.B
    replied
    Originally posted by Glenn Vergara View Post
    Yeah, the effect would be the same either way. But for code clarity, you should change 3 in the condition to 12 too. If not, the code means, "if number of photos in the array is more than 3, then slice the array to get 12 photos." It always assumes that the length of the array is at least 12 if the length is more than 3. That doesn't make sense but it doesn't throw any error because array_slice method knows how to handle it and it just gets the available length.
    Fair enough, I've amended my instructions.

    Leave a comment:


  • Glenn Vergara
    replied
    Originally posted by keegmen View Post
    and any way to change this icon?
    [ATTACH]n4206396[/ATTACH]
    It is recommended to change the icon sprites file (which contains all the icons used across the site) but that's not easy to do. Alternative solution is to override the background in css_additional.css template and specify individual icon image for each post status.

    Code:
    .vb-icon-topic-status { /* unread by default */
        background: url("path/to/the/image/unread.png") no-repeat;
    }
    
    .read .vb-icon-topic-status {
        background: url("path/to/the/image/read.png") no-repeat;
    }
    
    .closed .vb-icon-topic-status {
        background: url("path/to/the/image/closed.png") no-repeat;
    }
    
    .hot-unread .vb-icon-topic-status {
        background: url("path/to/the/image/hot-unread.png") no-repeat;
    }
    
    .hot-read .vb-icon-topic-status {
        background: url("path/to/the/image/hot-read.png") no-repeat;
    }
    
    .posted .vb-icon-topic-status {
        background: url("path/to/the/image/posted.png") no-repeat;
    }
    
    .posted-closed .vb-icon-topic-status {
        background: url("path/to/the/image/posted-closed.png") no-repeat;
    }
    
    .deleted .vb-icon-topic-status {
        background: url("path/to/the/image/deleted.png") no-repeat;
    }
    The existing icons have size of 16x18 so make sure your custom icons have the same size otherwise, you have to also specify the new width and height in the custom CSS.

    Leave a comment:


  • Glenn Vergara
    replied
    Yeah, the effect would be the same either way. But for code clarity, you should change 3 in the condition to 12 too. If not, the code means, "if number of photos in the array is more than 3, then slice the array to get 12 photos." It always assumes that the length of the array is at least 12 if the length is more than 3. That doesn't make sense but it doesn't throw any error because array_slice method knows how to handle it and it just gets the available length.

    Leave a comment:


  • Mark.B
    replied
    I've always wondered about that each time I change mine but it doesn't seem to have any effect whether I do or not.

    Leave a comment:


  • Glenn Vergara
    replied
    You still have to change the 3 in the condition
    Code:
    $contentInfo[$node]['photopreview'] = ($contentInfo[$node]['photocount'] > 3) ? array_slice($contentInfo[$node]['photo'], 0, 12) : $contentInfo[$node]['photo'];

    Leave a comment:


  • Mark.B
    replied
    If you wish, you can make a small file edit to increase this number.
    Note that we cannot support file edits and you'll need to re-apply this after every upgrade.

    In this file:
    core/vb/library/content/gallery.php

    Find:
    PHP Code:
    $contentInfo[$node]['photopreview'] = ($contentInfo[$node]['photocount'] > 3) ? array_slice($contentInfo[$node]['photo'], 03) : $contentInfo[$node]['photo']; 

    Change to:
    PHP Code:
    $contentInfo[$node]['photopreview'] = ($contentInfo[$node]['photocount'] > 12) ? array_slice($contentInfo[$node]['photo'], 012) : $contentInfo[$node]['photo']; 

    Then find:
    PHP Code:
    $contentInfo[$nodes]['photopreview'] = ($contentInfo[$nodes]['photocount'] > 3) ? array_slice($contentInfo[$nodes]['photo'], 03) : $contentInfo[$nodes]['photo']; 

    Change to:
    PHP Code:
    $contentInfo[$nodes]['photopreview'] = ($contentInfo[$nodes]['photocount'] > 12) ? array_slice($contentInfo[$nodes]['photo'], 012) : $contentInfo[$nodes]['photo']; 

    Obviously that gives you 12...you can use whatever number you prefer.
    Last edited by Mark.B; Tue 18 Nov '14, 4:06pm.

    Leave a comment:


  • keegmen
    replied
    and any way to change this icon?
    Click image for larger version

Name:	
Views:	2
Size:	31.3 KB
ID:	4206396

    Leave a comment:


  • Wayne Luke
    replied
    It is hard coded at three. If you click one of the photos, a lightbox showing all the photos in the Gallery will appear.

    Leave a comment:


  • keegmen
    started a topic Making for more than 3 attachments here?

    Making for more than 3 attachments here?

    Hi guys, how I can do to see more than 3 attachments here, if possible to see everyone. Thank you.

    Click image for larger version

Name:	
Views:	3
Size:	51.5 KB
ID:	4206240

Related Topics

Collapse

  • rnedelkow
    php upgrade 5.2 to 5.6
    by rnedelkow
    I recently upgraded php from 5.2 to 5.6 on my IIS server and noticed emails are not being sent to the webmaster's email address. Is there something I need to update in php 5.6 or the config file? I'm...
    Thu 8 Dec '16, 11:31am
Working...
X