News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

poll removal + additions question?

Started by vivithemage, November 15, 2010, 04:33:32 PM

Previous topic - Next topic

vivithemage

I prefer it if users could hit "New Topic" and the ability to create a poll is there. Like this mod :

http://custom.simplemachines.org/mods/index.php?mod=1200

I am not sure how to get that to work on RC4 though.

I'd like to remove the Create new poll option, and then just add the ability to add a poll to a new thread, makes a lot more sense...no reason to have the extra button.

Joker™

Quote from: vivithemage on November 15, 2010, 04:33:32 PM
I prefer it if users could hit "New Topic" and the ability to create a poll is there. Like this mod :

http://custom.simplemachines.org/mods/index.php?mod=1200

I am not sure how to get that to work on RC4 though.

I'd like to remove the Create new poll option, and then just add the ability to add a poll to a new thread, makes a lot more sense...no reason to have the extra button.
You would be surprised to know that mod worked perfectly on RC4, you just have to parse the mod fr SMF 1.1.5 and put those edits in your files.

(make backup of your files before editing them)
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

vivithemage

sorry, which edits? I am a coding nub!

Would this also get rid of the post new poll topic button as well?

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

Joker™

Quote from: vivithemage on November 15, 2010, 05:07:07 PM
Would this also get rid of the post new poll topic button as well?

Themes\MessageIndex.template.php (make backup of file before editing it)

Find and remove:
'post_poll' => array('test' => 'can_post_poll', 'text' => 'new_poll', 'image' => 'new_poll.gif', 'lang' => true, 'url' => $scripturl . '?action=post;board=' . $context['current_board'] . '.0;poll'),
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

vivithemage

Thanks a lot for the help.

Those 2 files do not exist for my theme I am using. Or should I just edit the default theme contents?

all I have under forums/themes/maintenance20 is

index.template.php
index.php
logo.psd
style.css
theme_info.xml

directories :

css
images
languages

Joker™

Yeah as i wrote above also file is in default theme directory

Themes\default\Post.template.php

Also move the image to (image in that mod package)
/Themes/<your theme>/images/icons/
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

vivithemage

ahhh, didn't know it worked like that for themes.

okay, got that working, any chance you can replace the image to say 'Add Post Poll' instead, and keep what the user posts?

I also could not get that removal to work, the link is still that after removing

'post_poll' => array('test' => 'can_post_poll', 'text' => 'new_poll', 'image' => 'new_poll.gif', 'lang' => true, 'url' => $scripturl . '?action=post;board=' . $context['current_board'] . '.0;poll'),


the ability to add a poll as a reply is there as well, probably need that gone somehow.

Joker™

Quote from: vivithemage on November 15, 2010, 05:30:47 PM
okay, got that working, any chance you can replace the image to say 'Add Post Poll' instead, and keep what the user posts?
Sorry can't you on that. Do you want to change some text around there?

Quote
I also could not get that removal to work, the link is still that after removing

'post_poll' => array('test' => 'can_post_poll', 'text' => 'new_poll', 'image' => 'new_poll.gif', 'lang' => true, 'url' => $scripturl . '?action=post;board=' . $context['current_board'] . '.0;poll'),


the ability to add a poll as a reply is there as well, probably need that gone somehow.
Actually the code I gave you removes the "New Poll" button from inside the board.As you asked here,
Quote from: vivithemage on November 15, 2010, 04:33:32 PM
I'd like to remove the Create new poll option, and then just add the ability to add a poll to a new thread, makes a lot more sense...no reason to have the extra button.

Isn't that what you wanted, or has I missed something :o
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

vivithemage

I wanted to get rid of that button in the top right, see picture.


can I change the picture to be text instead? Might be easier for users.

Joker™

Quote from: vivithemage on November 16, 2010, 09:40:19 AM
I wanted to get rid of that button in the top right, see picture.

Quote from: Joker™ on November 15, 2010, 05:17:15 PM
Themes\MessageIndex.template.php (make backup of file before editing it)

Find and remove:
'post_poll' => array('test' => 'can_post_poll', 'text' => 'new_poll', 'image' => 'new_poll.gif', 'lang' => true, 'url' => $scripturl . '?action=post;board=' . $context['current_board'] . '.0;poll'),

Have you tried this, this code exactly do what you are asking for. (Just see if your theme has MessageIndex.template.php, if so then make edits in it).


Quotecan I change the picture to be text instead? Might be easier for users.
What?? cant get 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

vivithemage

I did try that modification, removed the line, but the button is still there, my theme does not have it's own file either.

I'd like to change the image that that you can use, to words, like "Add Poll"

Joker™

Quote from: vivithemage on November 16, 2010, 01:16:50 PM
I'd like to change the image that that you can use, to words, like "Add Poll"
Open Themes/default/Post.template.php

Find:
<td colspan="2" style="padding-left:5ex;" align="left" valign="middle"><a href="', $scripturl, '?action=post;board=' . $context['current_board'] . '.0;poll"><img src="', $settings['images_url'], '/icons/addpoll.gif" width="25" height="12" alt="" /><b>', $txt['smf20'], '</b></a></td>


Replace it with:
<td colspan="2" style="padding-left:5ex;" align="left" valign="middle"><a href="', $scripturl, '?action=post;board=' . $context['current_board'] . '.0;poll">', $txt['add_poll'],'</a></td>

QuoteI did try that modification, removed the line, but the button is still there, my theme does not have it's own file either.
Which theme are you using?
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

vivithemage

It's becoming a lot more work then it is worth. I'll just lave it stock again.

Maybe in the future, they could allow the ability to create polls, with content already written, and not lose the content they typed.

Thanks for the help though, much appreciated.

Joker™

Quote from: vivithemage on November 16, 2010, 03:41:03 PM
It's becoming a lot more work then it is worth. I'll just lave it stock again.

Maybe in the future, they could allow the ability to create polls, with content already written, and not lose the content they typed.

Thanks for the help though, much appreciated.
have you tried my above post code?
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

vivithemage

Yes, that line you said to replace, did not exist. I downloaded the default template for RC4 and it wasn't their either.
I give up, LOL.

Joker™

Sorry for my typo, it's in default theme directory.

Themes\default\MessageIndex.template.php (make backup of file before editing it)

Find and remove:
'post_poll' => array('test' => 'can_post_poll', 'text' => 'new_poll', 'image' => 'new_poll.gif', 'lang' => true, 'url' => $scripturl . '?action=post;board=' . $context['current_board'] . '.0;poll'),
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

Deaks

vivithemage, did Jokers post help? do you still require assistance, if not can you please mark this as solved.
~~~~
Former SMF Project Manager
Former SMF Customizer

"For as lang as hunner o us is in life, in nae wey
will we thole the Soothron tae owergang us. In truth it isna for glory, or wealth, or
honours that we fecht, but for freedom alane, that nae honest cheil gies up but wi life
itsel."

Advertisement: