The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

Alterations?

View previous topic View next topic Go down

Alterations?

Post by Calιbuяn on February 9th 2012, 10:19 pm

Hi-

I'm looking for a way to make it so that whenever anyone's username is referenced in a post, it automatically links it to their profile. I had planned to do this in the Censors part of the admin panel, but I can't have the replacement contain the censored word, so I'm out of ideas.

Halp? Very Happy

-Lock

Calιbuяn
Forumember

Male Posts : 386
Reputation : 38
Language : English
Location : Detroit, MI

http://lazarusexp.forumotion.com/

Back to top Go down

Re: Alterations?

Post by LGforum on February 9th 2012, 11:35 pm

It would be near impossible to set that up browser side.

LGforum
Hyperactive

Male Posts : 2254
Reputation : 254
Language : English
Location : UK

http://www.avacweb.com/

Back to top Go down

Discount Rosetta Ston

Post by kkkz198609 on February 10th 2012, 10:30 am

Content Removed, Member Banned.

kkkz198609
New Member

Posts : 5
Reputation : 1
Language : eg

Back to top Go down

Re: Alterations?

Post by Calιbuяn on February 11th 2012, 2:32 pm

Bump Very Happy

Calιbuяn
Forumember

Male Posts : 386
Reputation : 38
Language : English
Location : Detroit, MI

http://lazarusexp.forumotion.com/

Back to top Go down

Re: Alterations?

Post by LGforum on February 11th 2012, 3:16 pm

I stand by what I say near impossible.

Let say you have a member named 'impossible', and I come on to your forum and say 'it would be impossible' ...
The browser doesn't know when/how/if any word is a username or not.

It could be possible with a custom BBtag, as the poster in SOME way has to reference that its a username.
But on forumotion, you may as well forget about it.

LGforum
Hyperactive

Male Posts : 2254
Reputation : 254
Language : English
Location : UK

http://www.avacweb.com/

Back to top Go down

Re: Alterations?

Post by Calιbuяn on February 11th 2012, 7:19 pm

Forumotion doesn't supposed custom BBtags at all?

Calιbuяn
Forumember

Male Posts : 386
Reputation : 38
Language : English
Location : Detroit, MI

http://lazarusexp.forumotion.com/

Back to top Go down

Re: Alterations?

Post by LGforum on February 11th 2012, 11:34 pm

Nope. Its possible to recreate the effect of a custom BB tag with javascript. But a tag that is parsed server-side is not possible.

Even using a custom BB tag, it would be differcult, because threads would need easy access to a list of usernames. While that sort of remains possible it requires an external server and other things which cost.

I have on my board, a Javascript array containing all member names, all member ID's and all member avatars, which helps create my avatar on index feature. So the member names can be easily accessed by Javascript, thats what I'm reffering too.

LGforum
Hyperactive

Male Posts : 2254
Reputation : 254
Language : English
Location : UK

http://www.avacweb.com/

Back to top Go down

Re: Alterations?

Post by enlil on February 12th 2012, 2:03 am

hi,

is using :

Code:
Hello [m]Darkibara[/m]!
good enough?

because in this case it would be possible to search members for a darkibara one

without this, like lgforum has said the script would need to search every word of a post wich is a little too much

enlil
New Member

Posts : 16
Reputation : 5
Language : c

Back to top Go down

Re: Alterations?

Post by LGforum on February 12th 2012, 3:01 am

But where do you plan 'search' for the username? ... and don't say AJAX.
Without an external server, i'd conclude it as not possible.

LGforum
Hyperactive

Male Posts : 2254
Reputation : 254
Language : English
Location : UK

http://www.avacweb.com/

Back to top Go down

Re: Alterations?

Post by enlil on February 12th 2012, 3:20 am

if you use ajax it's easy

enlil
New Member

Posts : 16
Reputation : 5
Language : c

Back to top Go down

Re: Alterations?

Post by LGforum on February 12th 2012, 3:28 am

Lol, I'd love to hear this plan of yours.

However, what if there is 30 posts on a page and each member posts a members username? Are you really going to make 30 Ajax requests? Wink
Thats why its concluded impossible.

LGforum
Hyperactive

Male Posts : 2254
Reputation : 254
Language : English
Location : UK

http://www.avacweb.com/

Back to top Go down

Re: Alterations?

Post by enlil on February 12th 2012, 4:00 am

well either do the request before posting the message ( and then replace with a [url=...]member name[/url] directly )

or do it when a member click on a link


and the plan is a function like this to get from an username the link to the profil :

Code:
function getprofil(username) {
  $.get("/memberlist?mode=joined&order=DESC&username=" + escape(username), function(a) {
    a = $(a).find("#memberlist a[href^='/u']").filter(function() {
      return RegExp("^\\s*" + username + "\\s*$", "i").test($(this).text())
    }).first();
    0 == a.length ? alert("member not found") : document.location.href = a.attr("href")
  })
};

enlil
New Member

Posts : 16
Reputation : 5
Language : c

Back to top Go down

Re: Alterations?

Post by LGforum on February 12th 2012, 5:12 am

It would be a nice alternative. But it's still a messy way.
And a few area would still be uncovered.

Having an array of usernames and user ids would still be the best way for anything like this or similar, these things need easy access to the information. Mainly because of post content/length and mount of posts is jut uncontrollable.

LGforum
Hyperactive

Male Posts : 2254
Reputation : 254
Language : English
Location : UK

http://www.avacweb.com/

Back to top Go down

View previous topic View next topic Back to top


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