KareraHekku Posted April 2, 2019 Share Posted April 2, 2019 So I want to edit a specific Users Profile Page, basically add a custom script to just their Page. But I don't know how to go about that. Anyone know how I could make that happen? And not reflect on all Profile pages? Quote Link to comment Share on other sites More sharing options...
Music Case Posted April 2, 2019 Share Posted April 2, 2019 For everyone to see or just the individual ? 1 Quote Link to comment Share on other sites More sharing options...
KareraHekku Posted April 2, 2019 Author Share Posted April 2, 2019 8 minutes ago, Music Case said: For everyone to see or just the individual ? For everyone to see But I would love to know a way to make it where only the individual could see as well. Not what I asked about, but would be cool to know for the future. Quote Link to comment Share on other sites More sharing options...
Music Case Posted April 2, 2019 Share Posted April 2, 2019 This will display only when phrase / word is in URL, so set it to the members URL like mine below: if(window.location.href.indexOf("1-titan") !== -1) { JAVASCRIPT } This will display based on member group: {{if \ IPS \ Member :: loggedIn () -> member_group_id === ID}} your code {{endif}} This will display based on member: {{if \ IPS \ Member :: loggedIn () -> member_id === ID}} your code {{endif}} 1 Quote Link to comment Share on other sites More sharing options...
KareraHekku Posted April 2, 2019 Author Share Posted April 2, 2019 33 minutes ago, Music Case said: This will display only when phrase / word is in URL, so set it to the members URL like mine below: if(window.location.href.indexOf("1-titan") !== -1) { JAVASCRIPT } This will display based on member group: {{if \ IPS \ Member :: loggedIn () -> member_group_id === ID}} your code {{endif}} This will display based on member: {{if \ IPS \ Member :: loggedIn () -> member_id === ID}} your code {{endif}} Thank you for the help! I've been trying the top code you provided in our Profile Template But it just seems to be placing the code above the Header on the Front end. Is there something I'm doing wrong? Or something I need to add in order to get it to work on the Profile Template? Or maybe I'm pasting it in the wrong place? I pasted it directly below this bit of code. {{if $member->photo}} {{\IPS\Output::i()->metaTags['og:image'] = $member->photo;}} {{endif}} Quote Link to comment Share on other sites More sharing options...
Music Case Posted April 2, 2019 Share Posted April 2, 2019 What custom script you wanting to run for that specific profile ? Quote Link to comment Share on other sites More sharing options...
KareraHekku Posted April 2, 2019 Author Share Posted April 2, 2019 LOL, it's silly but this <script type="text/javascript" src="https://panzi.github.io/Browser-Ponies/basecfg.js" id="browser-ponies-config"></script><script type="text/javascript" src="https://panzi.github.io/Browser-Ponies/browserponies.js" id="browser-ponies-script"></script><script type="text/javascript">/* <![CDATA[ */ (function (cfg) {BrowserPonies.setBaseUrl(cfg.baseurl);BrowserPonies.loadConfig(BrowserPoniesBaseConfig);BrowserPonies.loadConfig(cfg);})({"baseurl":"https://panzi.github.io/Browser-Ponies/","fadeDuration":500,"volume":1,"fps":25,"speed":3,"audioEnabled":false,"dontSpeak":true,"showFps":false,"showLoadProgress":false,"speakProbability":0.1,"spawn":{"rainbow dash":1},"autostart":true}); /* ]]> */</script> Quote Link to comment Share on other sites More sharing options...
Music Case Posted April 3, 2019 Share Posted April 3, 2019 (edited) Sorry it blocked me from answering the question, I think webflake thinks i'm trying to execute the code.... So here's a screenshot of my solution. I hope this helps, below is the page i got when i tried answering it. Edited July 1, 2020 by Music Case Quote Link to comment Share on other sites More sharing options...
KareraHekku Posted April 3, 2019 Author Share Posted April 3, 2019 2 minutes ago, Music Case said: Sorry it blocked me from answering the question, I think webflake thinks i'm trying to execute the code.... So here's a screenshot of my solution. I hope this helps, below is the page i got when i tried answering it. Oh I'm so sorry man! If I'd know it was causing you trouble I would have just asked you to Message it to me. But thank you for the help! I'll try it out now! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.