EllisLab text mark
Advanced Search
1 of 2
1
   
Is it possible to add a quick link to the CP Header for all Members at once?
Posted: 10 January 2008 06:15 PM   [ Ignore ]
Joined: 2007-10-05
25 posts

I know how to add quick links but I wanted to see if it was possible to add a quick link to all Member’s CPs at once.

Any thoughts?

 
Posted: 10 January 2008 08:10 PM   [ Ignore ]   [ # 1 ]   [ Rating: 0 ]
Avatar
Joined: 2006-04-15
12649 posts

Hmm,

Just created a second quick link and then took a look into the database table. It appears as though these are placed as a kind of pipe de-limited list like shown below

My Site|http://localhost:8888/test/index.php|1 Yahoo|http://www.yahoo.com|2 

You could theoretically use a SQL query to append a new quick link to the end of every member row but you would really need to do this before the users add any in themselves or you wouldn’t know which number to add in at the end because if one member had added in a link as I have above then the next one would be 3 but for anyone who hadn’t added one in then it would be 2.

Probably the easiest thing to do would be if you perform the SQL query at the start of an install so that everyone has that quicklink as their standard one?

Also make sure you back-up your database first incase it all goes tits up! grin

SQL Query
Can be performed by going into :

Admin->Utilities->SQL Manager->Database Query Form

UPDATE exp_members SET quick_links 'My Link|http://www.mylink.com|1' 

I’m pretty sure that should do it for you.

Hope that helps.

Best wishes,

Mark

 Signature 

Shopping Cart Plugin | Full List Of Add-Ons | About Me
——————————————————————————————
2.x Bug Tracker | Upgrade Errors

 
Posted: 10 January 2008 08:20 PM   [ Ignore ]   [ # 2 ]   [ Rating: 0 ]
Avatar
Joined: 2006-04-15
12649 posts

Actually was just wondering if one of the EE crew could possibly chime in here and let me know why the list has to have the number ids in there?
Would it not be possible for the system to work without these. I mean I know it has obviously been written that way and now will only work if placed in that format but was just wondering why the numbers are needed. Could the system not just parse out the links from the pipes as long as their is a link name then a pipe and then the url each time?

Also was there a reason why the numbers went at the end of each string? Is this some kind of standard programming practice?

Thanks. Just trying to learn as much about the system as I can.

Best wishes,

Mark

 Signature 

Shopping Cart Plugin | Full List Of Add-Ons | About Me
——————————————————————————————
2.x Bug Tracker | Upgrade Errors

 
Posted: 10 January 2008 08:23 PM   [ Ignore ]   [ # 3 ]   [ Rating: 0 ]
Avatar
Joined: 2004-05-14
20504 posts

Mark, did you look here?  My Account ›  Quick Links

To see what the number represents…

 
Posted: 10 January 2008 08:32 PM   [ Ignore ]   [ # 4 ]   [ Rating: 0 ]
Avatar
Joined: 2006-04-15
12649 posts

You’d think I would wouldn’t you!! grin

Actually I thought it was going to be that but as I never really use the quicklinks I was just looking at how to do this with a query and have never really been into that page.

Hmmm I wonder what would happen if the number was left off? Would the SQL query complain? May have to go and have a play on a dev server!!

Best wishes,

Mark

 Signature 

Shopping Cart Plugin | Full List Of Add-Ons | About Me
——————————————————————————————
2.x Bug Tracker | Upgrade Errors

 
Posted: 10 January 2008 08:43 PM   [ Ignore ]   [ # 5 ]   [ Rating: 0 ]
Avatar
Joined: 2006-04-15
12649 posts

A bit of an update for those following along at this ungodly hour (UK time)!! grin

If you run this query :

UPDATE exp_members SET quick_links 'Yahoo|http://www.yahoo.com|-
Google|http://www.google.com|-' 

then you will get two links placed in! grin The - is instead of using numbers to set the ordering. This appears to work okay but maybe an admin could let us know if there is any adverse problems in doing this? Could be useful for some people. I can’t see it causing a problem but just thought it best to ask first.

Also note there is a carriage return after each item and it must be there in the query or it won’t work correctly.

Hope that helps.

Best wishes,

Mark

 Signature 

Shopping Cart Plugin | Full List Of Add-Ons | About Me
——————————————————————————————
2.x Bug Tracker | Upgrade Errors

 
Posted: 10 January 2008 09:01 PM   [ Ignore ]   [ # 6 ]   [ Rating: 0 ]
Avatar
Joined: 2006-04-15
12649 posts

Another quick update. grin

You could of course just append the links to the end of whatever is already in the database field. This way it would create the links and if a user goes into their quicklinks and edits any of them or creates a new one then it will automatically update the -‘s and turn them into numbers instead anyway so hopefully should all be fine!! grin

Pretty sure that you would need to do this using PHP though to store the current value of quick_links and append the new links to the end of that. Not sure if this is possible using pure SQL queries alone though.

Best wishes,

Mark

 Signature 

Shopping Cart Plugin | Full List Of Add-Ons | About Me
——————————————————————————————
2.x Bug Tracker | Upgrade Errors

 
Posted: 11 January 2008 01:22 PM   [ Ignore ]   [ # 7 ]   [ Rating: 0 ]
Joined: 2007-10-05
25 posts

Mark your awesome, thank you sir!

The SQL Query worked as expected and since the members have yet to add any quick links, I didn’t have to worry about the numbers and dashes issue.

Thanks again!

 
Posted: 11 January 2008 01:39 PM   [ Ignore ]   [ # 8 ]   [ Rating: 0 ]
Avatar
Joined: 2006-04-15
12649 posts

No problem. Glad to have been of assistance.

Best wishes,

Mark

 Signature 

Shopping Cart Plugin | Full List Of Add-Ons | About Me
——————————————————————————————
2.x Bug Tracker | Upgrade Errors

 
Posted: 11 January 2008 01:44 PM   [ Ignore ]   [ # 9 ]   [ Rating: 0 ]
Joined: 2007-10-05
25 posts

You were a huge help!

Say since I’ve got you on the line, so to speak - might you know anything about ordering the weblog post under the Edit tab? I am trying to have the post be ordered by last modified as opposed to last created. I’ve created a post about this issue here but I haven’t had any repsonses.

Thanks!

 
Posted: 11 January 2008 01:58 PM   [ Ignore ]   [ # 10 ]   [ Rating: 0 ]
Avatar
Joined: 2006-04-15
12649 posts

Hiya,

Unfortunately I don’t think I will be able to help with that one as it is a little more complex than I can really manage. I think you would have to create a new drop-down menu using an extension hook of some kind.

I do remember someone once making an extension to add in an author drop-down sort menu and perhaps if you can find that it may be able to be modified to do as you need or may provide a good start to creating your own extension.

Hope that helps a little. If I get time later on I will try and find the extension and see if I can modify it to do what you need. No promises though as it will probably be way over my head!! grin

Best wishes,

Mark


EDIT : Found one of the posts.

 Signature 

Shopping Cart Plugin | Full List Of Add-Ons | About Me
——————————————————————————————
2.x Bug Tracker | Upgrade Errors

 
Posted: 11 January 2008 02:10 PM   [ Ignore ]   [ # 11 ]   [ Rating: 0 ]
Joined: 2007-10-05
25 posts

Yeah this is a tough one and is way above my head too!

It seems like something like this would be quite useful for a web admin or moderator. I’m surprised that this hasn’t been added as a standard feature in the drop downs.

I essentially just need a way to know who has changed already existing pages.

Thanks again!

 
Posted: 11 January 2008 04:46 PM   [ Ignore ]   [ # 12 ]   [ Rating: 0 ]
Avatar
Joined: 2006-04-15
12649 posts

You could perhaps have a template with a weblog tag set up to do what you need. Would only need to be a really simple template and just use the template privileges to only allow yourself to see it?

Best wishes,

Mark

 Signature 

Shopping Cart Plugin | Full List Of Add-Ons | About Me
——————————————————————————————
2.x Bug Tracker | Upgrade Errors

 
Posted: 11 January 2008 04:51 PM   [ Ignore ]   [ # 13 ]   [ Rating: 0 ]
Joined: 2007-10-05
25 posts

Very clever, not a bad ideal at all!
surprised

 
Posted: 11 January 2008 05:39 PM   [ Ignore ]   [ # 14 ]   [ Rating: 0 ]
Avatar
Joined: 2006-04-15
12649 posts

No problem wink

Best wishes,

Mark

 Signature 

Shopping Cart Plugin | Full List Of Add-Ons | About Me
——————————————————————————————
2.x Bug Tracker | Upgrade Errors

 
Posted: 05 February 2008 02:04 PM   [ Ignore ]   [ # 15 ]   [ Rating: 0 ]
Joined: 2007-10-05
25 posts

Hey there Mark,

I hate to crack this one back open but I’ve noticed that this works perfectly for all the current members but when a new member is added the link is not there of course. Do you know of any way we could set this as the default for link 1 for all current and future members?

If not no biggie we’ll just do a periodic refresher push of the ol’ DB!

Thanks,

Jonathan

 
1 of 2
1