Attention:

Support Rules and Guidelines
Before you post your support topic, please remember to:
  • Read the support forum rules.
  • Check the wiki and use search to see if your problem can be answered there first.
  • Link your board please, and make sure that the problem on your board is visible to guests or provide a test account.
  • Do not post Board Wrappers and CSS unless requested. With a board link, this is not necessary.
  • Be as descriptive as you can and use as many details as possible when describing your problem.
This will help ensure your support issue will be attended to in a quick and efficient manner.

  ClosedNew TopicNew Poll

 redirect link to webpage instead of member profile. [SOLVED]
#
does anyone know how to redirect links? when members click on staff accounts (there are three of us) i want it to redirect them to a webpage instead of their member profiles.

edit: e.g. if they click on say my account (sitename.jcink.net/index.php?showuser=1), they'll automatically be redirect them to sitename.jcink.net/index.php?act=Pages&kid=WEBPAGEKEYNAME

This post has been edited by coop: Dec 11 2016, 12:03 PM
PM
#
It's cheap... but you could enable HTML in profile fields for yourself/staff if not there already, and then stick something like:

<script>document.location='webpage url';</script>

Right into one of them.

A cleaner solution would be a board wrapper conditional in the wrappers.

signature
email: admin@jcink.com :: blog: John C.
#
i'd prefer the cleaner solution (especially if it's more reliable?) but i haven't a clue how to do it/what you mean.

edit: i don't know if it matters, but i am using cfs.
i'm not sure how to do this either, but on forums you can put a little note/rule at the top - could we use it that way? or is there a way to use cfs so i can code different ones specifically for the staff?


This post has been edited by coop: Dec 20 2016, 08:58 PM
PM
#
bump.
PM
#
bump!
PM
#
QUOTE (John @ Dec 11 2016, 07:43 PM)
It's cheap... but you could enable HTML in profile fields for yourself/staff if not there already, and then stick something like:

<script>document.location='webpage url';</script>

Right into one of them.

A cleaner solution would be a board wrapper conditional in the wrappers.



how do i enable html in profile fields and where do i stick the code? would there be a delay or an actual redirect page that says they're being directed, because i just want it to be instant as if that's where the link leads.


OR

i'm converting cfs into html templates right now, is there a way to just create a separate member profile (main profile/custom profile) for staff?
do i have to start a new topic for that?


This post has been edited by coop: Jan 9 2017, 09:48 AM
PM
#
coop, I apologize, because I thought this issue was solved and then over the holidays I completely missed this post.

There would be no huge delay using the redirect method I pasted. Based on what you want to do and since you have been waiting so long, here is the "clean" solution. Unlike most other codes, place this under <% JAVASCRIPT %> in the board wrappers.

CODE
<script>
/* Redirect profile to webpage */
if('<!-- |input_act| -->' == 'Profile') {
/* Root admin member #1 */
if('<!-- |input_showuser| -->' == '1') {
document.location='http://google.com';
}
}
</script>


This will redirect the root account, or member #1 to any page you wish, with the least delay.

signature
email: admin@jcink.com :: blog: John C.
#
thank you so much, john i really do appreciate that and it works like a charm!
now, to do this with the other two staff profiles (as there are three of us), do i just duplicate?

CODE
if('<!-- |input_showuser| -->' == '1') {
document.location='http://google.com';
PM
#
Yeah. Just don't forget the } to close that conditional http://files.b1.jcink.com/html/emoticons/wink.gif

signature
email: admin@jcink.com :: blog: John C.
#
thank you sfm!
PM
#
This topic has been solved. If you need anymore help please post a new thread. Thanks for choosing Jcink services.

signature
email: admin@jcink.com :: blog: John C.
0 User(s) are reading this topic (0 Guests and 0 Anonymous Users)
0 Members:
Share this topic:
« Next Oldest | General Support | Next Newest »

Options ClosedNew TopicNew Poll