DragonPrime - LoGD Resource Community
Welcome Guest
  • Good afternoon, Guest.
    Please log in, or register.
  • December 15, 2017, 01:47:53 PM
Home Forums News Downloads Login Register Advanced Search
* * *
DragonPrime Menu
Login
 
 
Resource Pages
Search

Pages: [1]   Go Down
  Print  
Author Topic: Move Superuser Grotto Links  (Read 823 times)
0 Members and 1 Guest are viewing this topic.
TGTarheel
Captain of the Guard
***
Offline Offline

Posts: 189


View Profile
« on: July 31, 2017, 10:04:09 PM »

I would like to know if there is a way to mmove the Superuser Grotto link.

I would like to see the left-side navigatns the way my players see them, and the Superuser Grotto links get in the way of seeing it.

I was wondering if it would be possible to code a module that would move that link up to the upper right, near, say, the Petition Viewer...instead of in the left-side navigations.

The reason I ask is because, literally every module has Grotto links as well as the villages and so on.  I do not want to have to manually add blocknavs on every module everywhere...was wondering if there was a way to achieve this.

By the way, I run 1.1.0 on my server.
Logged
Aeolus
Mod God
*****
Offline Offline

Posts: 1796


You're welcome.


View Profile WWW
« Reply #1 on: July 31, 2017, 10:11:54 PM »

I would like to see the left-side navigatns the way my players see them, and the Superuser Grotto links get in the way of seeing it.

Create a second account that doesn't have any superuser flags? Quickest way to see things like a player is to be a player.

I was wondering if it would be possible to code a module that would move that link up to the upper right, near, say, the Petition Viewer...instead of in the left-side navigations.

That would require core editing, rather than a module. Take a look at the templates and see how the links are added.

The reason I ask is because, literally every module has Grotto links as well as the villages and so on.  I do not want to have to manually add blocknavs on every module everywhere...was wondering if there was a way to achieve this.

That's a module doing that. sulinks.php, I believe, adds Grotto links to every page.
Logged

TGTarheel
Captain of the Guard
***
Offline Offline

Posts: 189


View Profile
« Reply #2 on: July 31, 2017, 11:07:53 PM »

I would like to see the left-side navigatns the way my players see them, and the Superuser Grotto links get in the way of seeing it.

Create a second account that doesn't have any superuser flags? Quickest way to see things like a player is to be a player.
Agreed.  And I have a player character.  The problem is I still see the Grotto Links because, for now, i have the Translation Too active for this player because I am overhauling the site.
I was wondering if it would be possible to code a module that would move that link up to the upper right, near, say, the Petition Viewer...instead of in the left-side navigations.

That would require core editing, rather than a module. Take a look at the templates and see how the links are added.
That was what I was afraid of.  Would it require also editing every single module that would add the grotto links?

The reason I ask is because, literally every module has Grotto links as well as the villages and so on.  I do not want to have to manually add blocknavs on every module everywhere...was wondering if there was a way to achieve this.

That's a module doing that. sulinks.php, I believe, adds Grotto links to every page.
Yeah...adding Grotto Links to pages.  I want to remove them from where they are, and put them somewhere else.  A little different concept.  I was just wondering if it would be possible to make a module that would do this...or would I have to try to attempt it via core edit?

It just seemed to me that if there is a module to add superuser links to pages...then seems like one could be made to remove them.  And maybe in the same module, add the Grotto link up near the Petition Viewer link, like I mentioned.  Just was wondering if it was even possible to do this before I started wasting time if it isn't.
« Last Edit: July 31, 2017, 11:12:43 PM by TGTarheel » Logged
Aeolus
Mod God
*****
Offline Offline

Posts: 1796


You're welcome.


View Profile WWW
« Reply #3 on: August 01, 2017, 03:31:09 PM »

Agreed.  And I have a player character.  The problem is I still see the Grotto Links because, for now, i have the Translation Too active for this player because I am overhauling the site.

Well, then - you don't have a player account then, do you?

That was what I was afraid of.  Would it require also editing every single module that would add the grotto links?
Yeah...adding Grotto Links to pages.  I want to remove them from where they are, and put them somewhere else.  A little different concept.  I was just wondering if it would be possible to make a module that would do this...or would I have to try to attempt it via core edit?

It just seemed to me that if there is a module to add superuser links to pages...then seems like one could be made to remove them.  And maybe in the same module, add the Grotto link up near the Petition Viewer link, like I mentioned.  Just was wondering if it was even possible to do this before I started wasting time if it isn't.

Let's think about this. If you have a module that adds Grotto links to every page... and you want to remove or edit those links... why not remove or edit that very same module? Having a module that adds the links then creating a new module to block those links is utterly pointless. I also just told you which module it is.

Also still a core edit.
Logged

TGTarheel
Captain of the Guard
***
Offline Offline

Posts: 189


View Profile
« Reply #4 on: August 01, 2017, 06:22:46 PM »

Agreed.  And I have a player character.  The problem is I still see the Grotto Links because, for now, i have the Translation Too active for this player because I am overhauling the site.

Well, then - you don't have a player account then, do you?

That was what I was afraid of.  Would it require also editing every single module that would add the grotto links?
Yeah...adding Grotto Links to pages.  I want to remove them from where they are, and put them somewhere else.  A little different concept.  I was just wondering if it would be possible to make a module that would do this...or would I have to try to attempt it via core edit?

It just seemed to me that if there is a module to add superuser links to pages...then seems like one could be made to remove them.  And maybe in the same module, add the Grotto link up near the Petition Viewer link, like I mentioned.  Just was wondering if it was even possible to do this before I started wasting time if it isn't.

Let's think about this. If you have a module that adds Grotto links to every page... and you want to remove or edit those links... why not remove or edit that very same module? Having a module that adds the links then creating a new module to block those links is utterly pointless. I also just told you which module it is.

Also still a core edit.

So you are saying to edit the sulinks.ph file to remove the links instead of add them.  That makes sense.  But that only covers the villages...not the hundreds of modules that alsoo have Grotto links...this is where I am getting confused...how to get rid of them...and then...how to move the grotto link where I want it moved?

A simple blocknav would work - replacing all the addnav in sulinks with a blocknav.  But does that take care of the links in all the many modules of the game and then there is still the need to have a link...but at the upper right.  THAT is probably where a core edit is required.

Or am I wrong here? My coding skills are intermediate.  I know just enough to be truly dangerous.
Logged
Stephen.Kise
Codemeister
****
Offline Offline

Posts: 380


So meme'd up.


View Profile
« Reply #5 on: August 02, 2017, 09:23:40 AM »

I was wondering if it would be possible to code a module that would move that link up to the upper right, near, say, the Petition Viewer...instead of in the left-side navigations.

That would require core editing, rather than a module. Take a look at the templates and see how the links are added.

That is not true. Hook into everyheader-loggedin, use the $header global string and append the grotto link after {petitioncount}. Also,
Logged

Slowly progressing fork with PHP 7 support: https://github.com/stephenKise/Legend-of-the-Green-Dragon
Cheap VPS Hosting (10$ credit!): https://m.do.co/c/acde75b086c5
Aeolus
Mod God
*****
Offline Offline

Posts: 1796


You're welcome.


View Profile WWW
« Reply #6 on: August 02, 2017, 02:17:00 PM »

That is not true. Hook into everyheader-loggedin, use the $header global string and append the grotto link after {petitioncount}. Also,

That... would make sense. I completely forgot about the everyheader-loggedin hook. I stand corrected. And also?
Logged

TGTarheel
Captain of the Guard
***
Offline Offline

Posts: 189


View Profile
« Reply #7 on: August 02, 2017, 08:56:28 PM »

Good so far, but of course, only want those with Grotto access to have the link in the everyheader.
Logged
Aeolus
Mod God
*****
Offline Offline

Posts: 1796


You're welcome.


View Profile WWW
« Reply #8 on: August 03, 2017, 06:26:14 PM »

Good so far, but of course, only want those with Grotto access to have the link in the everyheader.

Check how any admin module makes these links available to only those with grotto access. It'll be an in "if" statement, concerning the user's superuser flags.
Logged

TGTarheel
Captain of the Guard
***
Offline Offline

Posts: 189


View Profile
« Reply #9 on: August 04, 2017, 07:22:20 AM »

Duhhh.  That's what I get for trying to do too many things at the same time.

OK, so I would alter sulinks to remove, via blocknav, all the superuser links...and then have it add the link, conditionally, using every-header-logged in - which is a hook.

That would then theoretically get me what I am after....it would seem.

I might have to go about checking a few other modules to make sure they do not also add the navs...for example, I am using a fork of Wraith's that adds the Grotto links.  Meaning I could grab the conditional right from there, too or any other admin module...I know it is something like if SU_USER = true or something...gotta look...
Logged
TGTarheel
Captain of the Guard
***
Offline Offline

Posts: 189


View Profile
« Reply #10 on: August 04, 2017, 07:35:39 AM »

here is what is in Wraith's:

Code:
if( $session['user']['superuser'] & SU_MANAGE_MODULES )

this is from sulinks
Code:
if ($session['user']['superuser'] &~ SU_DOESNT_GIVE_GROTTO){

from multichecker
Code:
if ($session['user']['superuser'] & SU_MEGAUSER) { //only access for megausers

Finding several other variations...but it seems to me like the one from sulinks would be what I want...because it would then give the link to all who actually have grotto access on any level.

By the way, looking around on my site and discovered I have sulinks installed.  Should try deactivating it and see what I see.  THEN...try to go about what I have in mind.

I put the site together years ago and I do not remember everything I have there, LOL

BUT...one thing bothers me.  SU_DOESNT_GIVE_GROTTO  - should it not be SU_GIVES_GROTTO?

Code:
Or maybe forget it and just use if ($session['user']['superuser']) = true {

Thus, theoretically giving the link to any superuser?

Advice here?

Normally I'd play o my own, but I don't want to accidentally give grotto access to unauthorized people and not know about it.
« Last Edit: August 04, 2017, 07:38:49 AM by TGTarheel » Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  


*
DragonPrime Notices
Welcome to DragonPrime - The LoGD Resource Community!

Support Us
No funds raised yet this year
Your help is greatly appreciated!
Recent Topics
DragonPrime LoGD
Who's Online
15 Guests, 0 Users
Home Forums News Downloads Login Register Advanced Search