TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
Stats
  • Total Posts: 196,004
  • Total Topics: 21,330
  • Online today: 174
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 85
  • Total: 85

Extra Nav Button - Edit Buddies

Started by maximx86, January 04, 2008, 11:19:46 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

maximx86

Hi,

How can I add a button with link to 'Edit Buddies'? I tried to edit index.template.php adding the following lines but received an error
     // Show the [main site] button.
echo '<li><a href="http://mysite.com/index.php?action=profile;u=1;sa=editBuddies">Show Buddies</a></li>';


I am sure there is a more reasonable way of doing it...

Thanks




G6Cad

Please read and follow the posting guidlines we have for this support forum.
Make the proper edits to your first post and then we go from there.

maximx86

I am sorry for hassling you. Can you send me a link to the "Posting Guide"?
It's quite difficult to find it and I am new to this site. I found a link to 'Forum Rules'

http://www.tinyportal.net/smf/index.php?topic=2520.0

but it seems to be broken...


G6Cad

Sticky topic in this very forum holds the posting guide.

maximx86

Thanks,

I am using the latest version (Powered by SMF 1.1.4 ) and TP  TinyPortal v0.9.8. I am using the 'Outlline' theme designed by 'dzinerstudio

These are the mods I have insta;;ed
Ad Managment      2.3
SMF Gallery Lite      1.8.1.2
Enhanced Calendar      1.1

The error I get while adding the lines below into ndex.template.php is

// Show the [main site] button.
echo '<li><a href="http://mysite.com/index.php?action=profile;u=1;sa=editBuddies">Show Buddies</a></li>';


An Error Has Occurred!
You are not allowed to access this section 

I am not using any other CMSs... The SMF is installed on a linux box which has access to the Internet yet so I cannot give you the url yet...I will be online next week...

I hope this is enough information for you to help me. Let me know please if you need anything else.

Thanks

maximx86

The linux box has NO access to the Internet

Thank you

IchBin

You are getting that error because the link is pointing to the u=1 account which is admin. If everyone tried to click that link then of course, they will get an error because they cannot edit the admins buddies.
// Show the [main site] button.
echo '<li><a href="http://mysite.com/index.php?action=profile;u=',$context['user']['id'],';sa=editBuddies">Show Buddies</a></li>';


maximx86

Thanks IchBin

Works great  ::).
There is one more thing. The button isn't displayed correctly and it is not underlined when mouseover.

Last time I was adding something in here (code below) to get the button look normal, but I do not know what to put in here now..

$current_action = 'admin';
if (in_array($context['current_action'], array('search', 'admin', 'calendar', 'profile', 'mlist', 'register',


Many thanks

G6Cad

For the layout you ave to ask the theme author as we dont have to much knowlage on the theme your using.

maximx86


This website is proudly hosted on Crocweb Cloud Website Hosting.