vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Major Additions - Links and Downloads Manager (https://vborg.vbsupport.ru/showthread.php?t=119041)

AndrewD 07-22-2007 01:40 PM

Quote:

Originally Posted by Rouzbeh1 (Post 1298203)
the file types i have are mostly (99.5%) .zip files which are in vb attachments table.
the other file types are pdf and wmv. these both are on the table too.
about the allowance thing, there are 2 allowance systems for attachments. one of them is for vb attachments and the other one is from LDM. but i don't know which one was meant by itsblack....

my suggestion: all files get a file size allocated when submitting entry, would it be possible to read this size when a user clicks to download that file? just like hit recording. it's just one more query. (as far as i can understand!!) :D but you are the specialist ;)

one more thing, does LDM reset the bytes transfered when i delete hits for a period of time? i haven't tested this...

The code generally knows the size - it just wasn't storing the bytes transferred in the downloads table unless it actively managed the transfer itself. I'm taking another look at that. itsblack was also talking about the LDM system.

Yes, LDM resets the bytes transferred when you clean up the hits table.

Alfa1 07-22-2007 01:50 PM

I am integrating the LDM navbar with the standard vb navbar, by placing the links in quick links and in Moderator tools. That goes well so far. But I wonder about the edit category link.

The link normally is local_links.php?action=editcat&catid=X where X is the category ID.
This doesn't work because it needs a conditional to find the ID of the category that one is in.:
Code:

<if condition="is_member_of($bbuserinfo,5,6,7)"><tr><td class="vbmenu_option"><a href="local_links.php?action=editcat">Edit Category</a></td></tr></if>
What code can I use to fetch the correct category/catid?

If you like I will post the code for this navbar integration, so that other members can enjoy this as well.

AndrewD 07-22-2007 03:49 PM

Quote:

Originally Posted by Alfa1 (Post 1298236)
I am integrating the LDM navbar with the standard vb navbar, by placing the links in quick links and in Moderator tools. That goes well so far. But I wonder about the edit category link.

The link normally is local_links.php?action=editcat&catid=X where X is the category ID.
This doesn't work because it needs a conditional to find the ID of the category that one is in.:
Code:

<if condition="is_member_of($bbuserinfo,5,6,7)"><tr><td class="vbmenu_option"><a href="local_links.php?action=editcat">Edit Category</a></td></tr></if>
What code can I use to fetch the correct category/catid?

If you like I will post the code for this navbar integration, so that other members can enjoy this as well.

If the user is viewing a category, the variable $viewcatid is set to the category id and is positive. Alternatively, you can look at $vbulletin->GPC['catid']

jGas 07-22-2007 04:46 PM

Quote:

Originally Posted by AndrewD (Post 1298113)
I recall that bug in version 2.2.7, and it will be fixed in the release candidate of 2.2.8 (it's actually fixed in the beta, but there's a new bug in that which stops autocreation of posts for comments working at all :o)

Sorry

thanks, so i wait for the new release! :D

CamJM 07-23-2007 02:54 AM

Quote:

Originally Posted by AndrewD (Post 1296287)
This should be the *can_edit_category* permission. Is it not working correctly?

Yeah i guess it's not working because the can_edit_category permission is ticked for administrators but I can't edit a category created by the other admin.

AndrewD 07-23-2007 04:23 AM

Quote:

Originally Posted by CamJM (Post 1298717)
Yeah i guess it's not working because the can_edit_category permission is ticked for administrators but I can't edit a category created by the other admin.

I don't understand. I've just tested this, with both versions 2.2.7 and 2.2.8.

admin user 1 creates category
admin user 2 edits that category

Only difference is that in version 2.2.7, admin user 2 cannot change the name of the user who 'owns' the category, but can otherwise edit it.

I must be missing something - do you want me to take a look at your site?

tamborinegal 07-23-2007 04:46 AM

Hi Andrew,

I was wondering if there is any way to link from the postbit to all the users submissions as you can on the users profile. I know it could be done using something like local_links_search.php?action=show&userid=xxxx&sor t=d - but can it be done using a conditional so that every user doesn't get this showing in their postbit. Most of my members don't have links added in yet and it would just go to a blank page... Is there a way doing this?

Thanks for any help,

Cheers

Clancy

AndrewD 07-23-2007 05:12 AM

Quote:

Originally Posted by tamborinegal (Post 1298770)
Hi Andrew,

I was wondering if there is any way to link from the postbit to all the users submissions as you can on the users profile. I know it could be done using something like local_links_search.php?action=show&userid=xxxx&sor t=d - but can it be done using a conditional so that every user doesn't get this showing in their postbit. Most of my members don't have links added in yet and it would just go to a blank page... Is there a way doing this?

Thanks for any help,

Cheers

Clancy

Every day an interesting challenge :)

To avoid putting the link in everyone's postbits, this will currently need a new 'extra', which will have to check the database to see who has added entries to LDM. I'll have to think whether there is an efficient way of doing this, so that the database search is done once per thread not for every postbit.

tamborinegal 07-23-2007 05:42 AM

Quote:

Originally Posted by AndrewD (Post 1298780)
Every day an interesting challenge :)

:) Wouldn't want you staying idle Andrew.

Quote:

Originally Posted by AndrewD (Post 1298780)
To avoid putting the link in everyone's postbits, this will currently need a new 'extra', which will have to check the database to see who has added entries to LDM. I'll have to think whether there is an efficient way of doing this, so that the database search is done once per thread not for every postbit.

It was just an idea to promote that part of my forum a bit more. Not everyone checks out profile pages, but everyone sees the postbit, I just thought/was hoping it might have been something easy like a conditional.

Thanks for the reply,

Clancy

Rouzbeh1 07-23-2007 07:47 PM

hi Andrew,
is it possible to give moderators the permission to choose Parent forum, when they add a category without giving them too much permissions?


All times are GMT. The time now is 01:16 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.03716 seconds
  • Memory Usage 1,755KB
  • 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
  • (2)bbcode_code_printable
  • (8)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