News:

Wondering if this will always be free?  See why free is better.

Main Menu

new topic button/link on boards?

Started by steve51184, July 12, 2010, 11:28:02 AM

Previous topic - Next topic

Joker™

Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

Kill Em All



My Site: KEAGaming.com

Manual Installation of Mods
Prevent Spam and Forum Attacks
Please do not PM or email me for support unless offered, help should be publicly displayed to others.

NanoSector

My Mods / Mod Builder - A tool to easily create mods / Blog
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."

Kill Em All

Well from my understanding he wants it underneath the icon where those red lines are in the image he posted...


My Site: KEAGaming.com

Manual Installation of Mods
Prevent Spam and Forum Attacks
Please do not PM or email me for support unless offered, help should be publicly displayed to others.

NanoSector

Quote from: Kill Em All on July 17, 2010, 05:41:55 AM
Well from my understanding he wants it underneath the icon where those red lines are in the image he posted...
Yeah me too...but on the boards name it must be difficult...
My Mods / Mod Builder - A tool to easily create mods / Blog
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."

Joker™

my idea of saying drop menu was , like when you hover over the button , the sub buttons menu appears -- Like wise here when you hover (board name etc wherever we like) the drop menu with having " NEW TOPIC" button will appear .

in my code there's a <input> tag , this is creating a bit of mess to make that button disappeared when it's not hovered. i'm trying to workout some solution.

Kill Em All bro can you suggest something as im running out of ideas.
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

NanoSector

Quote from: Joker™ on July 17, 2010, 06:14:44 AM
my idea of saying drop menu was , like when you hover over the button , the sub buttons menu appears -- Like wise here when you hover (board name etc wherever we like) the drop menu with having " NEW TOPIC" button will appear .

in my code there's a <input> tag , this is creating a bit of mess to make that button disappeared when it's not hovered. i'm trying to workout some solution.

Kill Em All bro can you suggest something as im running out of ideas.
The normal Drop-down menu's?

<input type=dropdown>
(it's been a long time since I did input tags so excuse me if it was wrong :P)
My Mods / Mod Builder - A tool to easily create mods / Blog
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."

Kill Em All

Ok, I think I have two possible ways in my head, the one way is very long but I think it will work, the other way is quick but I'm honestly not even sure if its possible.

The recent topics list comes from the Sources/recent.php and the Themes/default/recent.template.php files.

I'm wondering if its possible to open up a JS iframe type box that will load the recent topics/posts from the rolled over board. But I'm wondering if that would have to be hard coded or not. So it would only work on one board, which would make it pointless. This might work better with AJAX though, but unfortunately I don't know AJAX, at all really. With the iframe idea, I doubt that would work because when you then click on the topic link, it might try to load the page in that iframe box still instead of loading the whole page.

As you can tell, I don't have many ideas floating up in my head about this either. This post was sort of me typing my thoughts as they went along. I think iframe would be the best bet though, if you can get it to behave properly that is. I was also thinking about a do while loop that would circle through the user's unread topics until there were no more. But that would be a pretty complicated solution.


My Site: KEAGaming.com

Manual Installation of Mods
Prevent Spam and Forum Attacks
Please do not PM or email me for support unless offered, help should be publicly displayed to others.

Joker™

not able to get to the completion , in mean time i just made some changes for looks .



when you hover over New Topic it's color changes to black .
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

steve51184

Quote from: Joker™ on July 18, 2010, 04:11:23 PM
not able to get to the completion , in mean time i just made some changes for looks .



when you hover over New Topic it's color changes to black .

sweet... care to post the code? :)

Joker™

sure

BoardIndex.template.php
Find:
</td>
<td class="info">
<a class="subject" href="', $board['href'], '" name="b', $board['id'], '">', $board['name'], '</a>';



Add after:

if ($context['user']['is_logged']  && boardsAllowedTo('post_new'))
echo'
<a class="new_post" href="', $scripturl . '?action=post;board=',  $board['id']['href'] ,'")>', $txt['new_topic'], '</a>';



in index.css
Find

.table_list tbody.content td.children
{
color: #555;
font-size: 85%;
}



Add after

a.new_post
{
float:right;
background:url(../images/theme/menu_gfx.png) no-repeat 0 -60px;
cursor:pointer;
}
a.new_post:hover
{
color:#000;
}
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

NanoSector

Quote from: Joker™ on July 19, 2010, 11:00:13 AM
sure

BoardIndex.template.php
Find:
</td>
<td class="info">
<a class="subject" href="', $board['href'], '" name="b', $board['id'], '">', $board['name'], '</a>';



Add after:

if ($context['user']['is_logged']  && boardsAllowedTo('post_new'))
echo'
<a class="new_post" href="', $scripturl . '?action=post;board=',  $board['id']['href'] ,'")>', $txt['new_topic'], '</a>';



in index.css
Find

.table_list tbody.content td.children
{
color: #555;
font-size: 85%;
}



Add after

a.new_post
{
float:right;
background:url(../images/theme/menu_gfx.png) no-repeat 0 -60px;
cursor:pointer;
}
a.new_post:hover
{
color:#000;
}

It works sweet, thank you.
My Mods / Mod Builder - A tool to easily create mods / Blog
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."

Joker™

you guy can look into this link, for that button to appear when you hover somewhere

http://www.javascriptkit.com/script/script2/outlinemenu.shtml

i'm also trying to work it , out , but would be much better if get some support from you also :)

Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

steve51184

Quote from: Joker™ on July 19, 2010, 11:00:13 AM
sure

BoardIndex.template.php
Find:
</td>
<td class="info">
<a class="subject" href="', $board['href'], '" name="b', $board['id'], '">', $board['name'], '</a>';



Add after:

if ($context['user']['is_logged']  && boardsAllowedTo('post_new'))
echo'
<a class="new_post" href="', $scripturl . '?action=post;board=',  $board['id']['href'] ,'")>', $txt['new_topic'], '</a>';



in index.css
Find

.table_list tbody.content td.children
{
color: #555;
font-size: 85%;
}



Add after

a.new_post
{
float:right;
background:url(../images/theme/menu_gfx.png) no-repeat 0 -60px;
cursor:pointer;
}
a.new_post:hover
{
color:#000;
}


just tested this and it works for boards with id's like 1,2,7,9 etc but for a board with an id of 204 i got the below error:

"The topic or board you are looking for appears to be either missing or off limits to you."

any ideas?

Joker™

#54
*Edit * Fix

use this code in BoardIndex.template.php

if ($context['user']['is_logged']  && boardsAllowedTo('post_new'))
echo'
<a class="new_post" href="', $scripturl . '?action=post;board=',  $board['id'] ,'")>', $txt['new_topic'], '</a>';

 
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

steve51184

sweet thanks Joker that works perfect now

also i don't think we need to worry to much about the hover thing as it looks ok in the spot it's in now the only thing that needs changing really is the themeing of it to fit in a little better

Joker™

can u suggest something , will surely do it for you ;)
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

NanoSector

Quote from: Joker™ on July 22, 2010, 10:22:52 AM
can u suggest something , will surely do it for you ;)
There is a sort of white shadow besides the button..can you remove it?
My Mods / Mod Builder - A tool to easily create mods / Blog
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."

Joker™

i placed that "grey shadow" , to remove it

background:url(../images/theme/menu_gfx.png) no-repeat 0 -60px;  << remove this from a.new_post
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

steve51184

Quote from: Joker™ on July 22, 2010, 10:22:52 AM
can u suggest something , will surely do it for you ;)

erm i'm not good with design... maybe make the link a button (like the search one) and make it smaller?

Advertisement: