Add button shows the page and the forum

Started by Rene88, September 22, 2015, 03:22:25 PM

Previous topic - Next topic

Rene88

Hello

I have created a chat button and added the page under Linktree and it works great.
But its shows the forum underneeth it to. how can i remove that?

see attachment

and the forum part i want to remove on that page.

hope someone can help

Kindred

That is how chatbox mods work...

specific questions on the specific chatbox mod that you have chosen should be asked in the support thread dedicated to supporting that mod
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Rene88

its not the chat mod its the page from smf.
if i remove the link to the chat window it stil shows the forum. so its not the mod.

i added the button chat with this:

'chat' => array(
            'title' => 'chat',
            'href' => $scripturl . '?action=chat',
            'show' => true,
            'sub_buttons' => array(
            ),

and added the acction chat to the link tree and then it shows the chatbox window and the forum under it.
if i remove it at linktree than it dont show the chat window anymore but the forum is stil there.

margarett

Trust us, it *is* the MOD. It depends on how it is integrated into SMF.

SMF by itself doesn't "grab" any content neither it takes over any content.

What is the chat?
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Rene88

see my reply above

and it is not a mod i have installed on smf

margarett

I'm sorry but we can't help you if you refuse to answer our questions.
Again, what is the chat?

Do note that, because the chat is accessed via $scripturl . '?action=chat', it means that it *WILL* need to define a bunch of actions (code-wise), one of which is to call templates. SMF by itself has *NO IDEA* what to do with action=chat. It's up to the addon (be it an official MOD or not!) to define what should SMF load.
So it *IS* the MOD which defines where it is shown. SMF will NOT stuff BoardIndex under the chat just because "so"...
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Rene88

Oke  sorry its Blub chat.

and i at this to the Linktree:

// Show the navigation tree.
   theme_linktree();
   if(isset($_GET['action']) && $_GET['action']=='chat'){
   print '<iframe src="chat/index.php" border="0" frameborder="0" style="width:100%;height:400px;border:1px solid #9BAEBF"></iframe>';
   }

Then the chat frame apears.

i have made a button Galery just now and when i click galery it shows a page with the forum on it. (just dit it for the test)

margarett

Eeexactly ;)

That's how the MOD integrates to SMF. This is what causes your display.

// Show the navigation tree.
   theme_linktree();
   if(isset($_GET['action']) && $_GET['action']=='chat'){
   print '<iframe src="chat/index.php" border="0" frameborder="0" style="width:100%;height:400px;border:1px solid #9BAEBF"></iframe>';
   }


action = chat is unknown to SMF. As with every unknown action to SMF, it defaults to Board Index.
If you go to your forum and write on the URL www.yourforum.com/index.php?action=yabadabada you will get Board Index because SMF has no idea what action is "yabadabada. Yet, you will see that the action request does stay in the URL (until you navigate to another page)
So the MOD uses this behavior: SMF shows you the Board Index but the code you added to index.template.php stuffs an iframe if the URL has requested "chat".

It is possible to workaround this, yes. Can you give us a link to this chat's website, please? I don't find a "blub chat"...
edit: oh, now I see it. It's BlaB!
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Rene88

oke thanks that makes sense :)

sorry its blab! chat (http://hot-things.net/blab-ajax-php-chat)
the blab chat i host myself. its on my server. but i want to do the same with coppermine-gallery  http://coppermine-gallery.net/
that wil be hosted on my server to. and want to make the same as the chat page.

hope you could help

Kindred

basically - to do it the RIGHT way, you would not be using an iframe at all... you would CORRECTLY create a template and source file for it and then add it into the action array...

just adding an iframe will basically mess things up and make it difficult to make it look nice.

Coppermine has a bridge with SMF which allows it to link up nicely (or at least, it used to have a bridge)
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

margarett

Because you are using the paid version of the chat, I strongly suggest you to talk to them ;)

@Kindred, this is not a "proper" MOD, so the Sources/template lingo doesn't apply ;)
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Rene88

is that easy to make? (not that smart with code)

Blab has a database bridge if thats wat you mean? and coppermine to idd. but it is a page of its own blab and coppermine. but i want it in the forum. not to open a new page. hope you understand?

what i have made with the iframe is from them. thats there install quide.

is there a way with the tamplate that i get the same as i have now but that it not loads the main board?

margarett

Quote from: Rene88 on September 22, 2015, 04:33:25 PM
what i have made with the iframe is from them. thats there install quide.
Exactly because of that, I think that you should be talking to them, because you paid for the product...
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Rene88

yes for that chat.

but you guys know the most for SMF. and how to make a page like help or forum. and i want the same page i have now only not the forum board in it.

so i think i have more change with you guys that with the guys from that chat program.

margarett

OK, it's your choice ;) Here goes something.

Do a full backup of your forum before you start ;)
The best possibility is to remove all the code you added, then install the Custom Actions MOD
http://custom.simplemachines.org/mods/index.php?mod=331

Create a new HTML action, define "chat" as the action and in the action body add
<iframe src="chat/index.php" border="0" frameborder="0" style="width:100%;height:400px;border:1px solid #9BAEBF"></iframe>

This should at least give you the "clean" page for that chat you want to have.
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Rene88


Advertisement: