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-24-2007 04:28 AM

Quote:

Originally Posted by Rouzbeh1 (Post 1299511)
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?

The *can_set_permissions* permission determines whether the user can do this or not. The description on the admin/permissions page is slightly misleading - it does not give the user general admin privs, although I imagine it gives more powers than you want.

One approach is to edit the addnewcat template. Look for lines that contain
Code:

<if condition="$links_permissions['can_set_permissions']">
There are four in total in this template. The second encloses a sequence starting
Code:

<if condition="$links_permissions['can_set_permissions']">
<tr>
        <td class="alt1">
        <strong>$vbphrase[ll_forumparent]</strong>
        <br /><span class="smallfont">
        $curforumtitle<br />
        $vbphrase[ll_forumparent_text]
        </span>
        </td>

You could change this conditional test, e.g.
Code:

<if condition="$links_permissions['can_set_permissions'] or $links_permissions['can_moderate_links']">

Alfa1 07-24-2007 06:16 AM

Quote:

Originally Posted by AndrewD (Post 1298319)
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']


So do I understand you correct that if I place this code in my drop down, then the link will cause editing of the viewed category?
Code:

<if condition="is_member_of($bbuserinfo,5,6,7)"><tr><td class="vbmenu_option"><a href="local_links.php?action=editcat&catid=$viewcatid">Edit Category</a></td></tr></if>

AndrewD 07-24-2007 06:27 AM

Quote:

Originally Posted by Alfa1 (Post 1299841)
So do I understand you correct that if I place this code in my drop down, then the link will cause editing of the viewed category?
Code:

<if condition="is_member_of($bbuserinfo,5,6,7)"><tr><td class="vbmenu_option"><a href="local_links.php?action=editcat&catid=$viewcatid">Edit Category</a></td></tr></if>

As I understood, you only wanted this to show if the user is currently in a category, so I think (without testing it) that you need

Code:

<if condition="is_member_of($bbuserinfo,5,6,7) and $viewcatid>0"><tr><td class="vbmenu_option"><a href="local_links.php?action=editcat&catid=$viewcatid">Edit Category</a></td></tr></if>

Alfa1 07-24-2007 09:49 AM

Thanks! That works great. I applied the same to addcat and put this in a link to in vb's navbar as well. I have now added all LDM links in the vb navbar, except that I have to find a search integration solution. I requested a search integration solution here
How can I remove LDM's navbar?

AndrewD 07-24-2007 12:29 PM

Quote:

Originally Posted by Alfa1 (Post 1299976)
Thanks! That works great. I applied the same to addcat and put this in a link to in vb's navbar as well. I have now added all LDM links in the vb navbar, except that I have to find a search integration solution. I requested a search integration solution here
How can I remove LDM's navbar?

Easiest is to edit the links_header template, find the lines:
Code:

$header
$navbar
<if condition="$show['popups']">
<div align="center">

and change to
Code:

$header
$navbar
<if condition="$show['popups']">
<div align="center" style="display:none">


Alfa1 07-24-2007 02:42 PM

Yes, that works well. Thank you.

Rouzbeh1 07-25-2007 04:49 PM

Quote:

Originally Posted by AndrewD (Post 1299793)
The *can_set_permissions* permission determines whether the user can do this or not. The description on the admin/permissions page is slightly misleading - it does not give the user general admin privs, although I imagine it gives more powers than you want.

One approach is to edit the addnewcat template. Look for lines that contain
Code:

<if condition="$links_permissions['can_set_permissions']">
There are four in total in this template. The second encloses a sequence starting
Code:

<if condition="$links_permissions['can_set_permissions']">
<tr>
        <td class="alt1">
        <strong>$vbphrase[ll_forumparent]</strong>
        <br /><span class="smallfont">
        $curforumtitle<br />
        $vbphrase[ll_forumparent_text]
        </span>
        </td>

You could change this conditional test, e.g.
Code:

<if condition="$links_permissions['can_set_permissions'] or $links_permissions['can_moderate_links']">

thank you, will try;)

one more suggestion: is it possible to make vba modules read thumbs from ldm_thumb folder (local storage) instead of generating them each time?
for security reasons, i have my covers ftp on a separate server, and i don't want covers fail to display IF that server is down....

thanks :)

minimalize 07-25-2007 08:51 PM

Hey Andrew,

i?ve got another question. I hope it?s my last one :)

When i add a new link there is a select field where i can select the categorie. Is there an ability to get the main categories bold?

AndrewD 07-26-2007 04:55 AM

Quote:

Originally Posted by minimalize (Post 1301603)
Hey Andrew,

i?ve got another question. I hope it?s my last one :)

When i add a new link there is a select field where i can select the categorie. Is there an ability to get the main categories bold?

You mean the categories that are at the bottom of the tree (which have no parents)?

Edit the links_addnewlin_catselect_multi template (vb/admin/styles) and replace the current template with the following:

Code:

<if condition="$select_stage==1">        <select class="select" name="$list_name" id="$list_id" multiple="multiple" size="5" style="width:400px;  height:100px;">
        <optgroup label="$vbphrase[ll_parcatslabel]">
</if><if condition="$select_stage==2">                <option value="$catid"<if condition="$catsel==1"> selected="selected"</if> <if condition="$disabled">disabled="disabled"</if> <if condition="$class">class="$class"</if> <if condition="!$prepend">style="font-weight: bold;"</if>
>$catname<if condition="$catclosed"> [$vbphrase[ll_catclosed]]</if></option>
</if><if condition="$select_stage==3">
        </optgroup>
        </select>
</if>

In case you're intersted, the change is adding the conditional test
Code:

<if condition="!$prepend">style="font-weight: bold;"</if>

AndrewD 07-26-2007 05:59 AM

Quote:

Originally Posted by Rouzbeh1 (Post 1301349)
thank you, will try;)

one more suggestion: is it possible to make vba modules read thumbs from ldm_thumb folder (local storage) instead of generating them each time?
for security reasons, i have my covers ftp on a separate server, and i don't want covers fail to display IF that server is down....

thanks :)

Yes, good suggestion.

I think it is possible provided the vba module is set up to use the same size thumb as the linkbit.

Edit the adv_portal_custom_ldm_new_thumb_one template.

Replace the current template by
Code:

<tr>
<td align="center" <if condition="$links_defaults[cellsize]">width="$links_defaults[cellsize]"</if>>
<if condition="$linkimg">
<a href="$vboptions[bburl]/$LINKS_SCRIPT.php?catid=$linkcatid&amp;linkid=$linkid" title="$title">
<img src="$vboptions[bburl]/$RESIZE_SCRIPT.php?linkid=$linkid<if condition="$linkimgthumbsize!=$links_defaults[link_imagesize]">
&amp;size=$links_defaults[link_imagesize]</if>" border="0" alt="$linkcatname, $linkname" />
</a>
<else />
<span class="smallfont">$linktypebit<if condition="$linkstatus<=0">$linkname<else />$linkurllink</if></span>
</if>
</td>
</tr>

The modification is the test on linkimgthumbsize:
Code:

<if condition="$linkimgthumbsize!=$links_defaults[link_imagesize]">
&amp;size=$links_defaults[link_imagesize]</if>

I think that this will do the job provided the thumb is already cached. I will look at the code to see if it is possible at this point in LDM also to cache the thumb if it is being generated on the fly.

Let me know if that works ok.


All times are GMT. The time now is 02: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.03531 seconds
  • Memory Usage 1,766KB
  • 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
  • (15)bbcode_code_printable
  • (7)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (5)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