collapse

* User Info

 
 
Welcome, Guest. Please login or register.
Did you miss your activation email?

* Who's Online

  • Dot Guests: 61
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.

* Shoutbox

Refresh History
  • Shoutbox is not for support!
  • oNLy1: Nakroma, please use the forum for support - ask all the questions (dumb or not) they will get answered
    April 18, 2014, 08:03:49 PM
  • Nakroma: i know this is just another question but im too dumb for it, where can I actualy get into the GENERAL SETTINGS page? im dumb sorry ;-;
    April 18, 2014, 04:27:39 PM
  • Nakroma: ahh okey, i get it. thanks
    April 18, 2014, 04:16:18 PM
  • [SiNaN]: Please don't get me wrong; I didn't mean that. You need to use the navigation menu right above the yellow Documentation bar you describe to navigate through different sections of documentation.
    April 18, 2014, 04:12:37 PM
  • Nakroma: okey I am dumb, could someone point out where at the top of the site it is? with a screenshot or something? if you mean the yellow Documention bar, thats not clickable for  me :|
    April 18, 2014, 03:57:34 PM
  • [SiNaN]: I wouldn't say it's hidden, lol. And it's extensive enough, thanks to Angelina.
    April 18, 2014, 02:28:55 PM
  • oNLy1: Documentation [link] (hidden at top of site)
    April 18, 2014, 12:48:01 PM
  • Nakroma: am I dumb or is there actually no tutorial? [link]
    April 18, 2014, 08:29:41 AM
  • AngelinaBelle: Welcome Gusto Prod.  Please visit [link] for info on creating an SMF forum
    April 17, 2014, 12:04:00 PM
  • GUSTO PROD: hi all give me creat new forum free
    April 16, 2014, 12:21:54 PM
  • AngelinaBelle: Hello w1ck3d! Welcome to Simple Portal. Unfortunately, there are not Russian speakers here very often.  Aplogies
    April 14, 2014, 07:49:26 AM
  • w1ck3d: тест
    April 14, 2014, 02:50:12 AM
  • Underdog: How to use Simple Portal for SMF: [link]
    April 02, 2014, 07:52:45 PM
  • Underdog: Thariq, please post questions in the forum. thank you.
    April 02, 2014, 07:51:40 PM
  • Thariq: how to create portal/site
    April 02, 2014, 06:30:42 AM
  • Ali çelen: forum nasıl oluştırıcam
    March 30, 2014, 10:59:08 PM
  • Ali çelen: sa
    March 30, 2014, 10:58:54 PM
  • AngelinaBelle: processor -- I think your customization will probably be just fine.
    February 14, 2014, 07:18:41 PM
  • AngelinaBelle: noumankhan: Welcome to SimplePortal.  Please read the documentation above. If you have questions about how to make a forum, please seek help at [link]
    February 14, 2014, 07:16:45 PM
  • noumankhan: how can i make forum plz tell me
    February 13, 2014, 09:41:03 AM

* Team Blog

* Recent Posts

Re: Where is the GENERAL SETTINGS tab? by oNLy1
[Today at 01:39:08 PM]


Re: Where is the GENERAL SETTINGS tab? by Nakroma
[Today at 08:33:46 AM]


Meta description by Snoopix
[Yesterday at 11:17:13 PM]


Re: Help with site by oNLy1
[Yesterday at 08:44:52 PM]


Re: Where is the GENERAL SETTINGS tab? by oNLy1
[Yesterday at 08:40:04 PM]

Blocks speak! Do you have an interest in getting more blocks - or even making your own? The Blocks Board is for you!

Author Topic: Changing forum title if there is new shout  (Read 1636 times)

0 Members and 1 Guest are viewing this topic.

Offline phantomm

  • Translator
  • *
  • Posts: 326
  • Gender: Male
  • Smile, tomorrow will be worse...
  • SMF Version: 2.0.2
  • SP Version: 2.3.5
Changing forum title if there is new shout
« on: February 28, 2013, 09:18:03 AM »
Hi, so I've been trying to make something like this:

If there is new shout in SP Shoutbox forum title would be changed to "New shout!", but when you visit tab/window with this shourbox it should be changed to default forum title.

I know how and where* use document.title = 'New shout!';. Problem is how to reset forum title to default after visiting page, without need to refresh whole page?

* - you need to add document.title before this code in portal.js
Code: [Select]
}

setInnerHTML(document.getElementById('shouts_' + shoutbox_id), new_body);
« Last Edit: February 28, 2013, 09:20:31 AM by phantomm »

Offline Underdog

  • Support
  • *
  • Posts: 721
  • Gender: Male
  • On Hiatus
    • Underdog-01 GitHub Repositories
  • SMF Version: 2.0.7
  • SP Version: 2.3.5
Re: Changing forum title if there is new shout
« Reply #1 on: February 28, 2013, 10:32:27 AM »
phantomm,

  Imo use DOM or javascript.

Here it is using javascript:
Code: [Select]
echo '<script type="text/javascript">
    document.title = "New Page Title";
  </script>';


Offline phantomm

  • Translator
  • *
  • Posts: 326
  • Gender: Male
  • Smile, tomorrow will be worse...
  • SMF Version: 2.0.2
  • SP Version: 2.3.5
Re: Changing forum title if there is new shout
« Reply #2 on: February 28, 2013, 12:01:50 PM »
Thanks for repy, but this code will change title right after page will be loaded.
What I need to have here is JS to set specified forum title when user will go to already open tab.

Offline Underdog

  • Support
  • *
  • Posts: 721
  • Gender: Male
  • On Hiatus
    • Underdog-01 GitHub Repositories
  • SMF Version: 2.0.7
  • SP Version: 2.3.5
Re: Changing forum title if there is new shout
« Reply #3 on: March 04, 2013, 01:49:42 AM »
Thanks for repy, but this code will change title right after page will be loaded.
What I need to have here is JS to set specified forum title when user will go to already open tab.

phantomm,

  My apologies for the late reply as I am working on a project as of late.
I have not tested it but you put what I posted in a js function & have it execute the function when the shout button or ie. onkeydown keycode 13 (return/enter) is executed if I understand you correctly.

Code: [Select]
echo '<script type="text/javascript">
onLoad = function changeTitle() {
    document.title = "New Page Title";
}
  </script>';
.. then in the js for what I mentioned prior you execute changeTitle()