vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   Major Additions - Mindestic GlosPro 1.2.2 (https://vborg.vbsupport.ru/showthread.php?t=132632)

bada_bing 12-06-2006 06:04 PM

Can some tell me how I can only allow certain groups to turn on/off the glassary from the usercp? Currently all usergroups have this option, I want to only allow certain groups to have this option in usercp, any help with this please?

SS9267547 12-06-2006 10:23 PM

To allow certain groups to be able to view this find the following code in the 'modifyoptions' template:

PHP Code:

<!-- Start Glossary User Options -->
<if 
condition="$vboptions['vbglossaryactive']"

Replace it with:
PHP Code:

<!-- Start Glossary User Options -->
<if 
condition="$vbulletin->userinfo['usergroupid'] == '2'">
<if 
condition="$vboptions['vbglossaryactive']"

The find the following:
PHP Code:

</if>
<!-- 
End Glossary User Options -->
<
br /> 

Replace it with:
PHP Code:

</if>
<!-- 
End Glossary User Options -->
<
br />
</if> 

Now replace '2' with whatever usergroup number you want to be able to view it.

Amenadiel 12-07-2006 03:35 AM

Is there a way to turn letterbit on for every page of the glossary?

I mean, when I'm looking at a certain definition I'd really like to have the letterbit above it.

SS9267547 12-07-2006 04:33 AM

There is no settings for that but it can be done by editing the templates as well the main glossary.php file, so it depends on howw badly you want it lol.

Amenadiel 12-07-2006 10:08 AM

Well I'm getting to know the code, I've already modified the code to make glossary.php without args to act as if it had received a do=listglossary&c=1 by editing the "default action":

if (empty($_REQUEST['do']))
{
$_REQUEST['do'] = 'listglossary';
$_REQUEST['c'] = '1';
}

Then I also inserted a "show all" link at the beggining of the letterbit, but it was a minor edit, I just added:

eval('$letterbits = "<td><a href=glossary.php>Show all</a></td>";');

before the other evals.

But this one I cannot accomplish. I edited the main Glossary template and in the section where the letterbit table is displayed I removed the "if" so it should display letterbit no matter what, and yet it doesn't happen.

I hope you don't mind I'm performing this little customization, I believe it's impossible to make a product to suit each and every webmaster out there LMAO.

EDIT: I did it! I hadn't noticed that in glossary.php the letterbit eval part is inside an if statement restricting it to show only if do = listglossary, so I took that whole part outside the 'if'. I had to set c = 1 because it is initially = 0 and takes me to a blank page.

SS9267547 12-07-2006 11:34 AM

No thats fine Amenadiel. I'm more then happy to see customization and happy to see people share what they did in the thread, who knows might add additional options for whatever has been added.

dilbert 12-07-2006 03:00 PM

Here's an interesting item I just noticed with cross linking.
If I have the word Telephone in the glossary, and a user places the work telephone in a post, the post becomes capitalized.

Is there a way to allow the post to remain as is?

bada_bing 12-07-2006 05:08 PM

Quote:

Originally Posted by SS9267547 (Post 1133526)
To allow certain groups to be able to view this find the following code in the 'modifyoptions' template:

PHP Code:

<!-- Start Glossary User Options -->
<if 
condition="$vboptions['vbglossaryactive']"

Replace it with:
PHP Code:

<!-- Start Glossary User Options -->
<if 
condition="$vbulletin->userinfo['usergroupid'] == '2'">
<if 
condition="$vboptions['vbglossaryactive']"

The find the following:
PHP Code:

</if>
<!-- 
End Glossary User Options -->
<
br /> 

Replace it with:
PHP Code:

</if>
<!-- 
End Glossary User Options -->
<
br />
</if> 

Now replace '2' with whatever usergroup number you want to be able to view it.

Thanks for the code... I want to be able to allow more then one usergroup to view this though and when I do this it doesnt show up for any usergroup

HTML Code:

<!-- Start Glossary User Options -->
<if condition="$vbulletin->userinfo['usergroupid'] == '5,6,7,11,12,16'">
<if condition="$vboptions['vbglossaryactive']">



An I doing something wrong?

SS9267547 12-07-2006 11:08 PM

dilbert: No I havn't figured a way with that. If someone does they can let me know lol.

bada_bing: Instead of this:
PHP Code:

<if condition="$vbulletin->userinfo['usergroupid'] == '5,6,7,11,12,16'"

Use this option, think it works lol:
PHP Code:

<if condition="$vbulletin->userinfo['usergroupid'] == '5' OR $vbulletin->userinfo['usergroupid'] == '6' OR $vbulletin->userinfo['usergroupid'] == '7'"


bada_bing 12-08-2006 12:38 AM

Quote:

Originally Posted by SS9267547 (Post 1134160)
dilbert: No I havn't figured a way with that. If someone does they can let me know lol.

bada_bing: Instead of this:
PHP Code:

<if condition="$vbulletin->userinfo['usergroupid'] == '5,6,7,11,12,16'"

Use this option, think it works lol:
PHP Code:

<if condition="$vbulletin->userinfo['usergroupid'] == '5' OR $vbulletin->userinfo['usergroupid'] == '6' OR $vbulletin->userinfo['usergroupid'] == '7'"


Awe this worked thank you... Now one more question.. What happens if in the past few days that the option was showing up in the usercp a member disabled the crosslinking and now I have removed that usergroup from seeing the crosslinking option in the usercp what would happen? Does the feature remain on or off?


All times are GMT. The time now is 03:34 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.01480 seconds
  • Memory Usage 1,770KB
  • 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_html_printable
  • (12)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)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