vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Links and Downloads Manager (https://vborg.vbsupport.ru/showthread.php?t=91107)

Ophelia 03-07-2006 08:33 PM

Quote:

Originally Posted by AndrewD
Has someone turned on the debug switch on the admin page?

Yes, it appears that it was turned on.. however, I'm 90% sure I didn't turn it on because it stated "do not change this unless told". I turned it off.. but thought you would like to know that this does happen if it's on for to long.

elsupremo 03-07-2006 10:10 PM

Quote:

Originally Posted by AndrewD
I'd appreciate comments on the following...

Recent beta versions of LDM include the option to show an 'Accept these terms' page in between requesting a download and actually getting it. The user is taken through an extra form, to which they must answer 'yes'.

This approach breaks down if the user has a third party download manager installed on their PC. The download manager grabs the download request, gets presented with the 'accept me' form, and doesn't know what to do, so ends up delivering a file of html to the user, who is naturally bemused.

I understand the wish to place an agreement between the system and the user, to remind people that the material they are downloading has some value.

Is there another way to handle this, e.g. how about an agreement before entering the category, rather than before trying to download the link, or an agreement that sets a cookie that's valuable for a period of time, etc?

Appreciate your suggestions.


Andrew,
Is there any way of implementing a system where the first time a user visit local_links.php, the form pops up before they can gain access to the downloads area. It then does not ask them again unless they leave the downloads area. Maybe even some kind of cookie that makes it so they only have to accept the first time they enter the downloads area.

Remember I don't know what I am doing, but it's just a suggestion. I like it because I think having a form before every single download is repetitive and disruptive of a client's browsing. I am usually in favor of policies that do not hamper the flow of clients' browsing experience.

Just an idea.

AndrewD 03-08-2006 03:35 AM

Quote:

Originally Posted by Firestar.chkn
Thanks! seems I missed that one.

I do see the upload_filetypes field, but I do not know in which format to add the two values to. They are added to the attachments table.

Sorry about that - you've found a bug in 2.1.3b3. I'd lost the declaration of a variable in the code that handles the upload_filetypes field - happened while I was 'tidying up'. The field should accept a list of file suffixes separated by commas, e.g. zip, rar

If you want a quick fix, edit local_links_misc.php, find the line
PHP Code:

function update_settings($catid$settings, &$errors) { 

and change the next line to
PHP Code:

global $db$mimetype_cache

You can just re-upload this file and (yes) the local_links_include.php - these changes do not require reinstallation.

AndrewD 03-08-2006 03:36 AM

Quote:

Originally Posted by Ophelia
Yes, it appears that it was turned on.. however, I'm 90% sure I didn't turn it on because it stated "do not change this unless told". I turned it off.. but thought you would like to know that this does happen if it's on for to long.

Thanks, I'll see if there's an easy way to trap this.

Langly 03-08-2006 03:47 AM

This is to help others that might want to use LDM to post on the portal like vbportal as a center block. It will display the latest uploads/links submitted. The code is 100% by Nitro at vbportal; I'm just copying it here so others might be able to use it as well.

Add a new php Center block in portalCP
Uses templates: Yes
Name: what you like

PHP Code:

global $db$vboptions$vbulletin$vbphrase$vbpoptions;

$link_query $db->query_read("SELECT * 
                FROM " 
TABLE_PREFIX "local_linkslink 
                WHERE linkmoderate = 0 
                ORDER BY linkdate DESC LIMIT 20"
);

while (
$linkinfo $db->fetch_array($link_query))
{
    
$linkname $linkinfo['linkname'];
    
$linkdate date("d-m-y"$linkinfo['linkdate']);
    
$linkuser $linkinfo['linkusername'];
    
$linksize $linkinfo['linksize']/1000/1000;
    
$linkid $linkinfo['linkid'];
    {
    if (
$link_cats $db->query_read("SELECT local_linkscat.catid, local_linkscat.catname FROM " TABLE_PREFIX "local_linkscat
                    LEFT JOIN " 
TABLE_PREFIX "local_linksltoc AS local_linksltoc ON local_linksltoc.catid = local_linkscat.catid 
                    WHERE local_linksltoc.linkid = " 
$linkid ""));

        {
        while (
$catinfo $db->fetch_array($link_cats))

            {
            
$linkcatid $catinfo['catid'];
            
$linkcatname $catinfo['catname'];
            eval(
'$latestldm_new .= "' fetch_template('P_ldm_new') . '";');
            }
        }
    }
}

return <<<EOT
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr align="center">
<td class="thead">&nbsp;</td><td class="thead">Name</td><td class="thead">Date</td><td class="thead">Submitter</td><td class="thead">Filesize</td><td class="thead">Categroy</td></tr>

<tr align="center">
    
$latestldm_new
</tr>
</table>
EOT;
$db->free_result($link_query$link_cats); 

PS ignore the "<?php BEGIN__VBULLETIN__CODE__SNIPPET " portion at the begining theres a bug in vb's php bbcode wrapper which does this its not supposed to be visible


Add a new template P_ldm_new

Code:

<tr><td width="20" class="alt1"><img src="$stylevar[imgdir_attach]/attach.gif" alt=""></td><td class="alt1">$linkname<br /><smallfont>Hits: $linkinfo[linkhits]&nbsp;Rating: $linkinfo[totrate]</smallfont></td><td class="alt2">$linkdate</td><td class="alt1">$linkuser</td><td class="alt2">$linksize&nbsp;MB</td><td class="alt1"><a href="$vbpoptions[bbdir]/local_links.php?catid=$linkcatid">$linkcatname</a></td></tr>
To change the amount listed first query "LIMIT 20" change the 20 to what you want

If you want to order by rating or hits first query again the "ORDER BY linkdate" change linkdate to linkhits for hit count or totrate for top rated.

I use it on my site and it works great. Thanks for working on that for me Nitro.

Langly 03-08-2006 03:48 AM

Andrew, any word on having LDM "post" in a forum the latest uploads?

AndrewD 03-08-2006 04:09 AM

Quote:

Originally Posted by Langly
This is to help others that might want to use LDM to post on the portal like vbportal as a center block. It will display the latest uploads/links submitted. The code is 100% by Nitro at vbportal; I'm just copying it here so others might be able to use it as well.

Thanks, I'll add this to the 'extras' directory with the next release (no support by me).

Be aware that this code does not deal with any of the LDM settings/permissions.

AndrewD 03-08-2006 04:10 AM

Quote:

Originally Posted by Langly
Andrew, any word on having LDM "post" in a forum the latest uploads?

No, sorry, this has not been an early priority for me.

Slave 03-08-2006 04:13 AM

Quote:

Originally Posted by AndrewD
Slave, OK, I think I have fixed these two problems, code attached. You may have to uninstall then delete the test LDM database (local_links_kill.php), as there will be some corrupt records in your admin table.

BUT - here is the basic difficulty. If you run this code
PHP Code:

$a[-1] = 10;
$a['-1'] = 20;
$a[1] = 50;
$a['1'] = 60;
print_r($a); 

with versions of php before 4.3.3, it will print out 10, 20, 60. If you run it with later verisons it will print out 20,60. In other words, php's handling of negative array indices changed in 2003. I'm trying to find the places in the code where this crops up, but it's not easy. If we can't isolate this pretty quickly, I'll give up, as I am likely to introduce new bugs in the process.

Thanks AndrewD :)

I'll have a play and let you know how I get on ..

Slave 03-08-2006 04:57 AM

All reported bugs fixed - check! :)

So far the only thing I can see as a bug is when you go to change the display settings of a cat, the change works but when you go back to edit again it seems to pull the overall default settings and not the settings you have for that cat.

Apart from that I can't see anything else wrong ....... at the moment :)

I'll keep playing .. and I'd like to say I appreciate the work/time you're putting into this AndrewD .. You're a star!

:D


All times are GMT. The time now is 11:49 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.02309 seconds
  • Memory Usage 1,785KB
  • 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
  • (4)bbcode_php_printable
  • (7)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (6)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