Is it possible to add a quick link to the CP Header for all Members at once?
Posted: 10 January 2008 03:15 PM   [ Ignore ]  
Summer Student
Total Posts:  25
Joined  10-05-2007

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?

Profile
 
 
Posted: 10 January 2008 05:10 PM   [ Ignore ]   [ # 1 ]  
Research Scientist
Avatar
RankRankRankRankRankRank
Total Posts:  6579
Joined  04-15-2006

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 

Full List Of Plugins Here!! (16)
 
Retrieve Statuses
Maximum Posts Reached
Neat Link
Redirect
Fetch URI

Profile
 
 
Posted: 10 January 2008 05:20 PM   [ Ignore ]   [ # 2 ]  
Research Scientist
Avatar
RankRankRankRankRankRank
Total Posts:  6579
Joined  04-15-2006

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 

Full List Of Plugins Here!! (16)
 
Retrieve Statuses
Maximum Posts Reached
Neat Link
Redirect
Fetch URI

Profile
 
 
Posted: 10 January 2008 05:23 PM   [ Ignore ]   [ # 3 ]  
Moderator
Avatar
RankRankRankRankRankRankRankRank
Total Posts:  32911
Joined  05-14-2004

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

To see what the number represents…

 Signature 
Profile
MSG
 
 
Posted: 10 January 2008 05:32 PM   [ Ignore ]   [ # 4 ]  
Research Scientist
Avatar
RankRankRankRankRankRank
Total Posts:  6579
Joined  04-15-2006

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 

Full List Of Plugins Here!! (16)
 
Retrieve Statuses
Maximum Posts Reached
Neat Link
Redirect
Fetch URI

Profile
 
 
Posted: 10 January 2008 05:43 PM   [ Ignore ]   [ # 5 ]  
Research Scientist
Avatar
RankRankRankRankRankRank
Total Posts:  6579
Joined  04-15-2006

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 

Full List Of Plugins Here!! (16)
 
Retrieve Statuses
Maximum Posts Reached
Neat Link
Redirect
Fetch URI

Profile
 
 
Posted: 10 January 2008 06:01 PM   [ Ignore ]   [ # 6 ]  
Research Scientist
Avatar
RankRankRankRankRankRank
Total Posts:  6579
Joined  04-15-2006

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 

Full List Of Plugins Here!! (16)
 
Retrieve Statuses
Maximum Posts Reached
Neat Link
Redirect
Fetch URI

Profile
 
 
Posted: 11 January 2008 10:22 AM   [ Ignore ]   [ # 7 ]  
Summer Student
Total Posts:  25
Joined  10-05-2007

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!

Profile
 
 
Posted: 11 January 2008 10:39 AM   [ Ignore ]   [ # 8 ]  
Research Scientist
Avatar
RankRankRankRankRankRank
Total Posts:  6579
Joined  04-15-2006

No problem. Glad to have been of assistance.

Best wishes,

Mark

 Signature 

Full List Of Plugins Here!! (16)
 
Retrieve Statuses
Maximum Posts Reached
Neat Link
Redirect
Fetch URI

Profile
 
 
Posted: 11 January 2008 10:44 AM   [ Ignore ]   [ # 9 ]  
Summer Student
Total Posts:  25
Joined  10-05-2007

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!

Profile
 
 
Posted: 11 January 2008 10:58 AM   [ Ignore ]   [ # 10 ]  
Research Scientist
Avatar
RankRankRankRankRankRank
Total Posts:  6579
Joined  04-15-2006

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 

Full List Of Plugins Here!! (16)
 
Retrieve Statuses
Maximum Posts Reached
Neat Link
Redirect
Fetch URI

Profile
 
 
Posted: 11 January 2008 11:10 AM   [ Ignore ]   [ # 11 ]  
Summer Student
Total Posts:  25
Joined  10-05-2007

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!

Profile
 
 
Posted: 11 January 2008 01:46 PM   [ Ignore ]   [ # 12 ]  
Research Scientist
Avatar
RankRankRankRankRankRank
Total Posts:  6579
Joined  04-15-2006

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 

Full List Of Plugins Here!! (16)
 
Retrieve Statuses
Maximum Posts Reached
Neat Link
Redirect
Fetch URI

Profile
 
 
Posted: 11 January 2008 01:51 PM   [ Ignore ]   [ # 13 ]  
Summer Student
Total Posts:  25
Joined  10-05-2007

Very clever, not a bad ideal at all!
surprised

Profile
 
 
Posted: 11 January 2008 02:39 PM   [ Ignore ]   [ # 14 ]  
Research Scientist
Avatar
RankRankRankRankRankRank
Total Posts:  6579
Joined  04-15-2006

No problem wink

Best wishes,

Mark

 Signature 

Full List Of Plugins Here!! (16)
 
Retrieve Statuses
Maximum Posts Reached
Neat Link
Redirect
Fetch URI

Profile
 
 
Posted: 05 February 2008 11:04 AM   [ Ignore ]   [ # 15 ]  
Summer Student
Total Posts:  25
Joined  10-05-2007

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

Profile
 
 
Posted: 05 February 2008 11:30 AM   [ Ignore ]   [ # 16 ]  
Research Scientist
Avatar
RankRankRankRankRankRank
Total Posts:  6579
Joined  04-15-2006

Hi Jonathan,

As far as I know there is no built in way of getting what you need but you could possibly make use of the New Member Register Hook found in the developers area.

Other than that it would be an update of the DB each time I’m afraid.

Best wishes,

Mark

 Signature 

Full List Of Plugins Here!! (16)
 
Retrieve Statuses
Maximum Posts Reached
Neat Link
Redirect
Fetch URI

Profile
 
 
Posted: 26 June 2008 06:43 AM   [ Ignore ]   [ # 17 ]  
Grad Student
Rank
Total Posts:  80
Joined  11-12-2007

Ok…  I just tested the yahoo/google links, now how do I UNDO this so I can add my own link?  I know, I wasn’t thinking, I wanted to see if it would work…

Profile
 
 
   
 
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 1149, on July 16, 2007 09:33 AM
Total Registered Members: 65030 Total Logged-in Users: 27
Total Topics: 82119 Total Anonymous Users: 11
Total Replies: 441331 Total Guests: 172
Total Posts: 523450    
Members ( View Memberlist )
Newest Members:  cfvicdreamNOIRgmonCooperWrightReedsmeenoiYang.JianuoioitsukiNathan Hammondalexcig