Register Members List Search Today's Posts Mark Forums Read

Reply
 
Article Options
  #31  
Old 06 Mar 2004, 01:15
Gary King's Avatar
Gary King Gary King is offline
 
Join Date: Jan 2002
Originally Posted by The Watcher
This looks promising gary -> a few questions !!!

1) How can I use this outside my forums directory? Do i just use this?


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

2) How can I limit access to this page to only users in the usergroups 7, 8 and 9 ?

3) I have a php links script which I would like integrated into my forums in terms of the way it looks and the way only certain usergroups can access it. Can i use your hack to do this? If so, how I would I make a php page appear in the content area instead of the TEST template ???

Thanks again
1) correct
2) replace $bbuserinfo[usergroupid] == 6 with $bbuserinfo[usergroupid] == 7 or $bbuserinfo[usergroupid] == 8 or $bbuserinfo[usergroupid] == 9
3) Replace eval('print_output("' . fetch_template('TEST') . '");'); with your PHP stuff.
Reply With Quote
  #32  
Old 07 Mar 2004, 14:23
VeoMorphine VeoMorphine is offline
 
Join Date: Nov 2002
Originally Posted by Gary W
Try something like:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Be sure to change the path to the global.php and the usergroupid as well (currently it's 6 for admins only).

Also, save this code in a file such as download.php and then you can use the file by linking to it like http://www.example.com/forum/downloa...=something.php which will download www.examlpe.com/forum/files/something.php if the user is an administrator.
I just want to make a correctiion to your code:
You use if($bbuserinfo[usergroupid]. On vb3, there is a new is_member_of function, that will search your primary and secondary groups for that user. Here is how the code works with it.



Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

that makes it so usergroup 6 5 and 7 can download that file.
Reply With Quote
  #33  
Old 07 Mar 2004, 14:33
Gary King's Avatar
Gary King Gary King is offline
 
Join Date: Jan 2002
Originally Posted by VeoMorphine
I just want to make a correctiion to your code:
You use if($bbuserinfo[usergroupid]. On vb3, there is a new is_member_of function, that will search your primary and secondary groups for that user. Here is how the code works with it.



Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

that makes it so usergroup 6 5 and 7 can download that file.
Ah okay thanks I never knew about that function
Reply With Quote
  #34  
Old 07 Mar 2004, 14:55
Davey-UK's Avatar
Davey-UK Davey-UK is offline
 
Join Date: Feb 2003
Location: Sheffield-UK
Real name: Dave
Cool

I like the idea of this, but looking around the Mod request pages, alot of people are looking for the last posts etc also to be displayed on a non vb page. I remember using something called API over at invision which was great. All you did was put includes in the page where you wanted specific things that were pulled from your board via templates which you could modify. Anyone know if something like this is going to be made? Gary W?
Reply With Quote
  #35  
Old 08 Mar 2004, 03:52
attroll's Avatar
attroll attroll is offline
 
Join Date: Jan 2003
I have been using this mod since VB 2. I see some changes. I don't care who wrote it. But I have two request.

1. I would like the new navbar that Beta 3 uses. Below the header in each page that I create.

2. I would like to see an icon or something on each page for a printable version.
Reply With Quote
  #36  
Old 08 Mar 2004, 05:49
SVTBlackLight01's Avatar
SVTBlackLight01 SVTBlackLight01 is offline
 
Join Date: Jan 2003
Originally Posted by The Watcher
This looks promising gary -> a few questions !!!

1) How can I use this outside my forums directory? Do i just use this?


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.
That works, but I discovered that you have to have the full URL for vbulletin_global.js and vbulletin_menu.js in the headinclude template. Otherwise the drop-down menus in the navbar will not work outside of the forum directory.
__________________
MODern ENGINEuity
Modular Ford Powered Community

Automotive Books, Movies, Games and More!
Reply With Quote
  #37  
Old 08 Mar 2004, 09:56
Osterling Osterling is offline
 
Join Date: Jan 2004
i hope some one answers my question here..

on the second part you say to make a template.. now what should i save the extention of my template..

for your ur example: test < should it have an exention be?

i am really new to php and all of it, so if you could please explain this 2 me, i'd be grateful
Reply With Quote
  #38  
Old 08 Mar 2004, 12:08
Gary King's Avatar
Gary King Gary King is offline
 
Join Date: Jan 2002
Originally Posted by exasko
i hope some one answers my question here..

on the second part you say to make a template.. now what should i save the extention of my template..

for your ur example: test < should it have an exention be?

i am really new to php and all of it, so if you could please explain this 2 me, i'd be grateful
Templates don't have extensions
Reply With Quote
  #39  
Old 08 Mar 2004, 12:09
Osterling Osterling is offline
 
Join Date: Jan 2004
so if i create it in notepad and save it as test that will work?
Reply With Quote
  #40  
Old 08 Mar 2004, 12:09
Gary King's Avatar
Gary King Gary King is offline
 
Join Date: Jan 2002
Originally Posted by attroll
I have been using this mod since VB 2. I see some changes. I don't care who wrote it. But I have two request.

1. I would like the new navbar that Beta 3 uses. Below the header in each page that I create.

2. I would like to see an icon or something on each page for a printable version.
1. already is there
Reply With Quote
  #41  
Old 08 Mar 2004, 14:17
attroll's Avatar
attroll attroll is offline
 
Join Date: Jan 2003
Originally Posted by Gary W
1. already is there
Gary W

If it is already there then why can't I see it? I see no navbar or anywhere where there is an option for a printable version. I did one of your mods and it did not show up. Here is the mod I did:

http://www.whiteblaze.net/forum/2004.php?
Reply With Quote
  #42  
Old 08 Mar 2004, 19:39
Gary King's Avatar
Gary King Gary King is offline
 
Join Date: Jan 2002
Originally Posted by exasko
so if i create it in notepad and save it as test that will work?
Nope you have to make a new template by using the Template Manager in admin cp
Reply With Quote
  #43  
Old 08 Mar 2004, 19:41
Gary King's Avatar
Gary King Gary King is offline
 
Join Date: Jan 2002
Originally Posted by attroll
Gary W

If it is already there then why can't I see it? I see no navbar or anywhere where there is an option for a printable version. I did one of your mods and it did not show up. Here is the mod I did:

http://www.whiteblaze.net/forum/2004.php?
*sigh* please don't bash hacks unless they truly don't work and it wasn't the installer's fault

Take a look at this screenshot, that's how it should look: http://www.vbulletin.org/forum/attac...chmentid=17205

Also, I never said I had included a printable version now did I?
Reply With Quote
  #44  
Old 08 Mar 2004, 20:56
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Real name: Rob
Originally Posted by Gary W
Who's Online Modification

Now if you want to show who is browsing this new page of yours, just open up online.php and find:
You might want to change the file they should edit to /includes/functions_online.php instead of online.php.
Reply With Quote
  #45  
Old 09 Mar 2004, 00:05
Gary King's Avatar
Gary King Gary King is offline
 
Join Date: Jan 2002
Originally Posted by Boofo
You might want to change the file they should edit to /includes/functions_online.php instead of online.php.
Fixed now.
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Article Options

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 16:30.

Layout Options | Width: Wide Color: