Welcome to Creative Nation!

Welcome to Creative Nation, . Feel free to browse our forums and help yourself to all our free tutorials, images, and recources!

Download

To download this script go back to article »

Member Login

Lost your password?

Not a member yet? Sign Up!

Forumotion link help


The next generation of web design.


You are not connected. Please login or register

Forumotion link help

View previous topic View next topic Go down  Message [Page 1 of 1]

1 Forumotion link help on 9/19/2011, 3:02 am

virtuosity

avatar
I know that is a confusing title but what I need is help with a few things. One being I want to create my own links like Sign out, Messages and Profile.

What I mean is if I put this in my template

Code:
<div id="sNavbar">
  <ul>
    <li><a href="http://forumthememedia.forumotion.com/search">Search</a></li>
    <li><a href="http://forumthememedia.forumotion.com/register">Register</a></li>
    <li><a href="#">No New Messages</a></li>
    <li><a href="#">Profile</a></li>
    <li><a href="#">Sign out</a></li>
  </ul>
</div>

Then what would be the dynamic link be for messages, profile and sign out? So that whenever a user is logged in they can click on profile and it takes them to their profile.

Another thing is I want the message link to show an image when there is a new message.. how do I do this?

2 Re: Forumotion link help on 9/19/2011, 11:53 am

Gangstar15

avatar

Profile link: /profile?mode=editprofile
PM (Inbox): /privmsg?folder=inbox
http://www.worlddezign.com/t849-forumotion-phpbb3-boards-pm-counter
Sign out: m/login?logout

all inside:
Code:
<!-- BEGIN switch_user_logged_in -->
<!-- END switch_user_logged_in -->

3 Re: Forumotion link help on 9/19/2011, 12:27 pm

virtuosity

avatar
Thanks buddy. The edit profile one I figured out. I want it to actually go to their profile.

4 Re: Forumotion link help on 9/19/2011, 2:25 pm

Gangstar15

avatar

aarh.. Saxaca or dion made a script for that..
http://diondesigns.forumotion.com/t440-
Code:
$(function() {
    var uid = document.getElementById('uid').innerHTML;

    if (uid !=-1) {
        var x = $('a.mainmenu[href*="/profile?mode=editprofile"]')[0];

        x.href = '/u'+ uid;
        x.innerHTML = 'My profile';
    }
});
make a div or whatever with an id "uid"

5 Re: Forumotion link help on 9/25/2011, 7:08 am

ely21double

avatar

Use that variables from phpBB:

Code:
<a href="{U_PRIVATEMSGS}">Your private message text</a>
<a href="{U_LOGIN_LOGOUT}">Your logout/login text</a>
<a href="/login">Your login text</a>
<a href="{U_REGISTER}">Your register text</a>

*note: {U_LOGIN_LOGOUT} it's for login and logout in the same time.

Or you can use Ganstar15's code Smile.

6 Re: Forumotion link help on 10/4/2011, 6:14 pm

virtuosity

avatar
How do I use the PM script?

Code:
    $.ajax({
      url: '/privmsg?folder=inbox',
      success: function(ajax) {
        count =$('img[src="NEW POST IMAGE URL"]', ajax).length;

        if (count > 0) {
          $('a[href*="privmsg"]').append('NEW!');
        }
      }
    });

Not sure how to use that? Plus I am using PunBB

7 Re: Forumotion link help on 10/5/2011, 10:46 am

Gangstar15

avatar

host it in fm scripts managements, and change "NEW POST IMAGE URL" to the new post image.

8 Re: Forumotion link help on 10/5/2011, 12:45 pm

virtuosity

avatar
I just upload it there and that is it?

Do I have to put a path in my template or anything?

Sponsored content


View previous topic View next topic Back to top  Message [Page 1 of 1]

Permissions in this forum:
You cannot reply to topics in this forum

.

Private forum on Forumotion | © PunBB | Free forum support | Contact | Report an abuse | Create a forum on Forumotion.