Thread: Major Additions - DownloadsII
View Single Post
  #1299  
Old 05-15-2007, 09:47 AM
RS_Jelle RS_Jelle is offline
 
Join Date: Jul 2005
Posts: 1,276
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by MotMann View Post
RS_Jelle, what happened with my problem with your special code. i have now all screens in one row

Here ist the post.
With this code you can choose the amount of images which fits the best (change the 4 to what you want):
PHP Code:
            $dimages .= '<table cellpadding="0" cellspacing="1" border="0"><tr>';
            
$countnumber 4;
            
$count 1;
            while (
$image $db->fetch_array($result))
            {
                if ((
$permissions['ecdownloadpermissions'] & $vbulletin->bf_ugp['ecdownloadpermissions']['caneditallfiles']) OR
                   ((
$permissions['ecdownloadpermissions'] & $vbulletin->bf_ugp['ecdownloadpermissions']['caneditownfiles']) AND
                    ((
$image['uploaderid'] == $vbulletin->userinfo['userid']) AND ($file['uploaderid'] == $vbulletin->userinfo['userid']))))
                {
                    
$edit '[<a href="./downloads.php?do=file&amp;id='.$file['id'].'&amp;act=delimg&amp;img='.$image['id'].'" onclick="return delete_it()">'.$vbphrase['delete'].'</a>]';
                }

                if (
file_exists($dl->url.$image['thumb']))
                {
                    if (
$count == $countnumber)
                    {
                        
$dimages '<tr>';
                    }
                    
$dimages .= '<td class="smallfont"><a href="'.$dl->url.$image['name'].'"><img src="'.$dl->url.$image['thumb'].'" alt="'.$file['name'].'" title="'.$file['name'].'" border="0" /></a><br />by <a href="./member.php?u='.$image['uploaderid'].'">'.$image['uploader'].'</a> on '.vbdate($vbulletin->options['dateformat'], $image['date'], true).' '.$edit.'</td>';
                    if (
$count == $countnumber)
                    {
                        
$dimages '</tr>';
                    }
                }
                else
                {
                    if (
$count == $countnumber)
                    {
                        
$dimages '<tr>';
                    }
                    
$dimages .= '<td class="smallfont"><a href="'.$dl->url.$image['name'].'">'.$image['name'].'</a><br />by <a href="./member.php?u='.$image['uploaderid'].'">'.$image['uploader'].'</a> on '.vbdate($vbulletin->options['dateformat'], $image['date'], true).' '.$edit.'</td>';
                    if (
$count == $countnumber)
                    {
                        
$dimages '</tr>';
                    }
                }
                
$count $count+1;
                if (
$count == $countnumber)
                {
                    
$count 1;
                }
            } 
Quote:
Originally Posted by progaming View Post
Im hoping someone can help me with this wonderful mod. When displaying the sub-catagoryys it doesn't display the parent cat's name like my forum does.

Any idea what I can do to fix this?

Here is a link. This should explain better what I would like to do.

THanks

http://insomniagaming.org/downloads.php?do=cat&id=2
Like wolfe says: your downloads section is private for members. Can you pm me a test account?

Normally the category tree is displayed in your navigation bar.

Quote:
Originally Posted by coolgus View Post
Great Script

One small problem though, don't know if it's a bug. When a user uploads a gif or any picture, nothing shows and I can see that the link in the program has an extra slash. For example forum.com/downloads//picture.jpg

Same time at the directory of downloads there is the filename of the picture with 0 size
Indeed, a small bug, but normally the image url still works with this. Will be fixed in a next release.

Quote:
Originally Posted by v12kid View Post
I have a few questions-

- will this work with icash?
- will this work with 3.6.6 ?
- can you restrict users based on post count? I onyl want users who have a certian post count or more to be able to access the downloads section. Can this be achieved with a different mod that restricst them to that forum?

thanks for the time, mod looks interesting
  • For iCash: I just discovered that mod, so we will be looking into an integration add-on in the future. Have a look at #1286.
  • It works nicely with vB 3.6.6 as I'm running it on my forum. Have a look at #1284 for more information.
  • This is possible when you use the vBulletin usergroup permissions and the promotion system. Set up a new usergroup, a copy of the normal registered users group. Create a promotion to it when they reach x amount of posts and give that group permission to access the downloads using the DownloadsII usergroup permissions.
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01405 seconds
  • Memory Usage 1,841KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_php
  • (4)bbcode_quote
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.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_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • 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
  • showpost_complete