Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: SMFHacks.com Team on July 25, 2006, 07:49:20 PM

Title: New Topic Button on View Topic
Post by: SMFHacks.com Team on July 25, 2006, 07:49:20 PM
Link to the mod (https://custom.simplemachines.org/index.php?mod=398)

Adds a new topic button to the default theme under view topic.
Title: Re: New Topic Button on View Topic
Post by: theunder-ground on July 25, 2006, 09:55:34 PM
I have been waiting for this mod.  Is there any way to maybe have it at the top of the topic as well?
Title: Re: New Topic Button on View Topic
Post by: vbgamer45 on July 25, 2006, 10:08:52 PM
Quote from: theunder-ground on July 25, 2006, 09:55:34 PM
I have been waiting for this mod.  Is there any way to maybe have it at the top of the topic as well?
Not yet for SMF 1.0.7 but if you use it I would add it.  I have it already for SMF 1.1 RC2
Title: Re: New Topic Button on View Topic
Post by: PrizeLive.com on July 25, 2006, 11:27:56 PM
Problem..

Installations actions for "New Topic Button":
Installing this package will perform the following actions:
   Type    Action    Description
1.    Execute Modification    ./Themes/default/Display.template.php    Test failed

I'm using 1.1 RC2...
Title: Re: New Topic Button on View Topic
Post by: denislici on July 26, 2006, 07:06:51 AM


yes i received the same error
Title: Re: New Topic Button on View Topic
Post by: vbgamer45 on July 26, 2006, 09:19:10 AM
Have any mods installed?
Title: Re: New Topic Button on View Topic
Post by: ArkServer on July 26, 2006, 09:30:21 AM
Works here, you rock dude ;) i like all your mods so far!
Title: Re: New Topic Button on View Topic
Post by: PrizeLive.com on July 26, 2006, 09:53:41 AM
Quote from: vbgamer45 on July 26, 2006, 09:19:10 AM
Have any mods installed?

Yeah.
Title: Re: New Topic Button on View Topic
Post by: vbgamer45 on July 26, 2006, 10:06:34 AM
Just one note this. Will only work on the default theme! For SMF 1.0.7 and SMF 1.1 RC2
Title: Re: New Topic Button on View Topic
Post by: PrizeLive.com on July 26, 2006, 02:06:23 PM
Quote from: vbgamer45 on July 26, 2006, 10:06:34 AM
Just one note this. Will only work on the default theme! For SMF 1.0.7 and SMF 1.1 RC2

I'm only using the default theme for 1.1 RC2.
Title: Re: New Topic Button on View Topic
Post by: snork13 on July 27, 2006, 09:38:05 AM
Quote from: SurfExcelerator.com on July 26, 2006, 02:06:23 PM
Quote from: vbgamer45 on July 26, 2006, 10:06:34 AM
Just one note this. Will only work on the default theme! For SMF 1.0.7 and SMF 1.1 RC2

I'm only using the default theme for 1.1 RC2.

yes, but what vbgamer45 is saying....if you have other mods installed, then other mods might not install correctly...why? Because the modification file can't find the code to change due to the fact that another mod has changed or moved that code which is needed. In a case like this you would manually install the mod.

-Snork13
Title: Re: New Topic Button on View Topic
Post by: Farmacija on February 22, 2007, 09:44:46 AM
thanx, it was very needed for my forum :)
Title: Re: New Topic Button on View Topic
Post by: Aileen on January 29, 2008, 08:13:16 PM
Can this mod be installed manually?
Title: Re: New Topic Button on View Topic
Post by: vbgamer45 on January 29, 2008, 08:27:57 PM
Yes it can be using the pacakge parser
http://www.smfhacks.com/smf-package-parser.html
Title: Re: New Topic Button on View Topic
Post by: kosty555 on April 15, 2008, 02:05:09 PM
You will do the version for SMF 2.0 Beta 3 Public ?
Title: Re: New Topic Button on View Topic
Post by: vbgamer45 on April 15, 2008, 08:06:50 PM
I will do an SMF 2.0 version once it is released might upgrade this one too since it probably didn't change will need to check though.
Title: Re: New Topic Button on View Topic
Post by: squad on September 06, 2008, 09:00:24 AM
I'm sorry if this is the wrong thing by posting in this topic since I received a warning, I thought that by doing so it might be safe to do so :)

I have SMF1.1.5 Babylon Theme and installed this modification a few weeks ago and it doesn't appear to work.

Please tell me I'm not nuts  :o is/was there something I had to do to activate this modification. I installed it via the Package Manager directly and not manually, that is something I still have to get up the guts at attempting  :-[

Thanks for any help :)
Title: Re: New Topic Button on View Topic
Post by: vbgamer45 on September 06, 2008, 10:10:17 AM
Only installs on the default theme for the latest for SMF 1.1.x
Title: Re: New Topic Button on View Topic
Post by: squad on September 06, 2008, 10:34:50 AM

Thank you vbgamer45 that's sad  :) Ah well back to square one, new glasses or reading lessions for a start, sadly my few membersreally like the Babylon theme, so changing it won't happen.

Thank you again vbgamer45 :)
Title: Re: New Topic Button on View Topic
Post by: vbgamer45 on September 13, 2008, 11:32:52 PM
Updated for SMF 2.0beta4!
Title: Re: New Topic Button on View Topic (Updated for SMF 2.0)
Post by: squad on September 14, 2008, 09:51:40 AM
Quote from: vbgamer45 on September 13, 2008, 11:32:52 PM
Updated for SMF 2.0beta4!

Top stuff, can't wait until we can install SMF 2.0 to my site, looking forward to all the new things it appears I can do :)
Title: Re: New Topic Button on View Topic (Updated for SMF 2.0)
Post by: Sudhakar Arjunan on November 07, 2008, 07:43:39 AM
Hi Vbgamer45,

I got the mod installed in my smf 2.0.4.

It show new topic only to admin and global moderators and its does not shows to users and other membergroup.

I have checked both on my default theme and custom theme.
Title: Re: New Topic Button on View Topic (Updated for SMF 2.0)
Post by: vbgamer45 on November 08, 2008, 12:32:01 AM
Hmm will need to check it out.
Title: Re: New Topic Button on View Topic (Updated for SMF 2.0)
Post by: Sudhakar Arjunan on November 08, 2008, 12:39:01 AM
Once installed, i thought it was working properly.

When members says , they could not see the new topic button. Then only i could realize it.
Title: Re: New Topic Button on View Topic (Updated for SMF 2.0)
Post by: Sudhakar Arjunan on November 08, 2008, 08:02:20 AM
Quote from: vbgamer45 on November 08, 2008, 12:32:01 AM
Hmm will need to check it out.

I found it, i have made moderations to all the post.

Once i change the permissions , all could post without moderation . And we have got new topic button to all users.
Title: Re: New Topic Button on View Topic (Updated for SMF 2.0)
Post by: tyhgdgh on November 10, 2008, 08:43:45 PM
how do you veiw in smf 1.1.6?
Title: Re: New Topic Button on View Topic (Updated for SMF 2.0)
Post by: vbgamer45 on November 11, 2008, 09:49:33 PM
It installs to the default theme by default and when you view a topic there is now a new topic link on that page as well.
Title: Re: New Topic Button on View Topic (Updated for SMF 2.0)
Post by: baijianpeng on December 01, 2008, 08:39:27 AM
Is it possible to add this feature to a custom theme? 

Today I tested this Mod on my SMF 1.1.7, though I manually add those code to my custom theme, there is NO new topic button.

Hope this Mod can also work for custom theme.

Thanks.
Title: Re: New Topic Button on View Topic (Updated for SMF 2.0)
Post by: tyhgdgh on December 01, 2008, 06:41:40 PM
if you want it on a custom theme, edit the themes ".template.php" files
Title: Re: New Topic Button on View Topic (Updated for SMF 2.0)
Post by: baijianpeng on December 01, 2008, 07:28:44 PM
I noticed that there is only one line of new code to be inserted in the XML file of this Mod:


<add><![CDATA[
'new_topic' => array((allowedTo('post_new')) ? 1 : 'test' => 'nothinglol', 'text' => 'smf258', 'image' => 'new_topic.gif', 'lang' => true, 'url' => $scripturl . '?action=post;board=' . $context['current_board'] . '.0'),]]></add>


I manually edited the file Display.template.php of my custom theme and inserted this line of code after the code for Reply button, but this does not take effect at all.

Do you mean I must edit more?

Thanks.
Title: Re: New Topic Button on View Topic (Updated for SMF 2.0)
Post by: vbgamer45 on December 01, 2008, 08:17:45 PM
What version of SMF are you using?
Title: Re: New Topic Button on View Topic (Updated for SMF 2.0)
Post by: baijianpeng on December 01, 2008, 10:35:09 PM
I am using SMF 1.1.7. The custom theme named rt_smf_versatility.

I had edited the file Display.template.php of this custom theme, but the New Topic button did not show up.

Could you please help me to solve this problem?

Thanks.
Title: Re: New Topic Button on View Topic (Updated for SMF 2.0)
Post by: vbgamer45 on December 02, 2008, 09:42:38 PM
Can you attach your Display.template.php file
Title: Re: New Topic Button on View Topic (Updated for SMF 2.0)
Post by: baijianpeng on December 03, 2008, 12:40:53 AM
Thank you vbgamer45.

see attached file.

The code I had manually inserted is at line 163.
Title: Re: New Topic Button on View Topic (Updated for SMF 2.0)
Post by: fext on December 05, 2008, 09:26:49 AM
Hi VBGamer,

I have a similar issue to baijianpeng but my theme is made up of divs rather than tables and i am guessing the code segment in my Display.template.php file is this (line 143 onward):

      // This is the button array for reply, send-topic, etc, here you can easily add and remove new buttons
      if ($context['can_reply'])
      $buttonArray[] = '<li class="reply"><a href="' . $scripturl . '?action=post;topic=' . $context['current_topic'] . '.' . $context['start'] . ';num_replies=' . $context['num_replies'] . '">' . $txt[146] . '</a></li>';
      if ($context['can_mark_notify'])
      $buttonArray[] = '<li class="notify"><a href="' . $scripturl . '?action=notify;sa=' . ($context['is_marked_notify'] ? 'off' : 'on') . ';topic=' . $context['current_topic'] . '.' . $context['start'] . ';sesc=' . $context['session_id'] . '" onclick="return confirm(\'' . ($context['is_marked_notify'] ? $txt['notification_disable_topic'] : $txt['notification_enable_topic']) . '\');">' . $txt[131] . '</a></li>';


I did have a go at trying to interpret your code into the way the code is written above but it did not work.

I am using SMF v1.1.7 and SmoothIt Theme.

My display template is also attached.
Title: Re: New Topic Button on View Topic (Updated for SMF 2.0)
Post by: neteater on July 10, 2009, 12:18:22 AM
installed it on 2.0rc1-1 on default theme successfully but new stylebuttons are not visible yet
Title: Re: New Topic Button on View Topic (Updated for SMF 2.0)
Post by: akbora on July 16, 2009, 04:04:13 AM
How can I add new topic button to the main menu? Thanks
Title: Re: New Topic Button on View Topic (Updated for SMF 2.0)
Post by: vbgamer45 on July 22, 2009, 02:41:19 PM
What do you mean main menu?
Title: Re: New Topic Button on View Topic (Updated for SMF 2.0)
Post by: the-punisher on October 16, 2009, 08:33:19 PM
one of the best mods ever thank u very much i  really needed this mod
Title: Re: New Topic Button on View Topic (Updated for SMF 2.0)
Post by: vbgamer45 on October 16, 2009, 08:47:34 PM
No problem glad it helps you!
Title: Re: New Topic Button on View Topic (Updated for SMF 2.0 RC2)
Post by: vbgamer45 on November 08, 2009, 09:48:59 PM
Updated to support SMF 2.0 RC2
Title: Re: New Topic Button on View Topic (Updated for SMF 2.0 RC2)
Post by: Sudhakar Arjunan on November 14, 2009, 07:04:05 PM
Quote from: vbgamer45 on November 08, 2009, 09:48:59 PM
Updated to support SMF 2.0 RC2

Thanks for this cool and needy update.
Title: Re: New Topic Button on View Topic (Updated for SMF 2.0 RC2)
Post by: Liam. on November 15, 2009, 08:14:08 AM
Such a simple mod, but luckily you've nailed it ^_^ MyBB, phpBB, etc. have this as default, SMF should aswell :/
Title: Re: New Topic Button on View Topic (Updated for SMF 2.0 RC2)
Post by: scimmiotto on December 11, 2009, 06:26:41 PM
yes...by the way, why smf has no "new topic" button on a post topic?
Title: Re: New Topic Button on View Topic (Updated for SMF 2.0 RC2)
Post by: vbgamer45 on December 11, 2009, 07:41:48 PM
Maybe you can request it to be part of SMF
Title: Re: New Topic Button on View Topic (Updated for SMF 2.0 RC2)
Post by: scimmiotto on December 12, 2009, 11:21:26 AM
where can i made this request?
Title: Re: New Topic Button on View Topic (Updated for SMF 2.0 RC2)
Post by: Spoogs on December 12, 2009, 11:24:04 AM
Quote from: scimmiotto on December 12, 2009, 11:21:26 AM
where can i made this request?
http://www.simplemachines.org/community/index.php?board=3.0
Title: Re: New Topic Button on View Topic (Updated for SMF 2.0 RC3)
Post by: vbgamer45 on March 08, 2010, 07:23:02 PM
Updated for SMF 2.0 RC3!
Title: Re: New Topic Button on View Topic (Updated for SMF 2.0 RC3)
Post by: steve51184 on July 12, 2010, 11:50:02 AM
any chance you can make it show the new topic link/button on the board index? this would be amazingly useful :)
Title: Re: New Topic Button on View Topic (Updated for SMF 2.0 RC3)
Post by: wishmaster22 on July 14, 2010, 02:25:24 PM
First of all  thanks for making this mod.... It is true genius! :)

I got this install on rc3 and all is well....

I have been trying to scan thru all of these pages for the solution to just a few things I would like to be able to do.

1. grab the full feed... when I click on that in the feed it gives me this message, but I don't know what to enter in the field... "Required if retrieving full article. This must be PCRE format. The match is expected to be in second index of the array ([1])."

2. I would like to get rid of the link of the source.

Are these things possible to do?


I hope so, it will really make my day! :)


Thanks
Title: Re: New Topic Button on View Topic (Updated for SMF 2.0 RC3)
Post by: vbgamer45 on July 14, 2010, 03:11:21 PM
I don't think you posted in the right topic this is about adding a button on view topic mod.
Title: Re: New Topic Button on View Topic (Updated for SMF 2.0 RC3)
Post by: steve51184 on July 14, 2010, 06:34:38 PM
Quote from: zx71 on July 12, 2010, 11:50:02 AM
any chance you can make it show the new topic link/button on the board index? this would be amazingly useful :)

ideas people? :)
Title: Re: New Topic Button on View Topic (Updated for SMF 2.0 RC3)
Post by: vbgamer45 on July 14, 2010, 06:36:28 PM
Outside the scrope of this mod there is no place to put a link on the board index that i know of.
Title: Re: New Topic Button on View Topic (Updated for SMF 2.0 RC3)
Post by: steve51184 on July 14, 2010, 06:41:46 PM
Quote from: vbgamer45 on July 14, 2010, 06:36:28 PM
Outside the scrope of this mod there is no place to put a link on the board index that i know of.

how about a link/button here?

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fimg36.imageshack.us%2Fimg36%2F2880%2Fcapturetu.jpg&hash=206a32eb2351a3b4f3916e72f8692bee76ef8fd8)
Title: Re: New Topic Button on View Topic (Updated for SMF 2.0 RC3)
Post by: Shades. on November 08, 2010, 12:16:49 PM
Please update this for RC4!?? :)
Title: Re: New Topic Button on View Topic (Updated for SMF 2.0 RC3)
Post by: TheListener on December 04, 2010, 10:19:20 PM
Quote from: BoZilla on November 08, 2010, 12:16:49 PM
Please update this for RC4!?? :)

Why not just use the advance link below the mod list then emulate?
Title: Re: New Topic Button on View Topic (Updated for SMF 2.0 RC4)
Post by: vbgamer45 on December 04, 2010, 10:29:31 PM
Updated for SMF 2.0 RC4 I forgot to upload it lol
Title: Re: New Topic Button on View Topic (Updated for SMF 2.0 RC4)
Post by: Biology Forums on December 27, 2010, 01:04:20 AM
Could someone tell me how to parse this on other themes using 1.1.11... Why can't I parse it to my classic theme? :(
Title: Re: New Topic Button on View Topic (Updated for SMF 2.0 RC4)
Post by: Biology Forums on December 29, 2010, 01:25:55 PM
Got it to work on Classic Theme for 1.1.12:

Find:

if ($context['can_reply'])
$buttonArray[] = '<a href="' . $scripturl . '?

action=post;topic=' . $context['current_topic'] . '.' . $context['start'] .

';num_replies=' . $context['num_replies'] . '">' . ($settings

['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' .

$context['user']['language'] . '/reply.gif" alt="' . $txt[146] . '"

border="0" />' : $txt[146]) . '</a>';


Add After:

if ($context['can_reply'])
$buttonArray[] = '<a href="' . $scripturl . '?

action=post;board=' . $context['current_board'] . '.' . $context['start'] .

';num_replies=' . $context['num_replies'] . '">' . ($settings

['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' .

$context['user']['language'] . '/new_topic.gif" alt="' . $txt[146] . '"

border="0" />' : $txt[146]) . '</a>';


And you're done...
Title: Re: New Topic Button on View Topic (Updated for SMF 2.0 RC4)
Post by: vbgamer45 on December 29, 2010, 01:28:14 PM
Thanks for the code for the classic theme
Title: Re: New Topic Button on View Topic (Updated for SMF 2.0 RC4)
Post by: sharks on December 29, 2010, 02:45:56 PM
Installation failed for Core theme for a fresh SMF 2.0 RC4 forum.
Title: Re: New Topic Button on View Topic (Updated for SMF 2.0 RC4)
Post by: vbgamer45 on December 29, 2010, 02:59:23 PM
All my mods will only install on the curve theme without issue other themes are not supported and will need to be modified.
Title: Re: New Topic Button on View Topic (Updated for SMF 2.0)
Post by: ApplianceJunk on December 29, 2011, 11:06:46 PM
Wow, one year in between post, lol..

Wanted to say thanks.
Installed fine on 2.0.2

thanks!
Title: Re: New Topic Button on View Topic (Updated for SMF 2.0)
Post by: vbgamer45 on December 29, 2011, 11:17:53 PM
Glad you enjoy it!
Title: Re: New Topic Button on View Topic (Updated for SMF 2.0)
Post by: FrizzleFried on September 27, 2012, 03:51:24 PM
How difficult would it be to modify this to add a NEW POLL button next to the NEW TOPIC button I already have (I added this mod a while ago).

Thanks!

Title: Re: New Topic Button on View Topic (Updated for SMF 2.0)
Post by: SMFHacks.com Team on September 27, 2012, 05:38:27 PM
Not very difficult would be similar code changes.
Title: Re: New Topic Button on View Topic (Updated for SMF 2.0)
Post by: humbleworld on October 29, 2012, 10:10:49 AM
Thank you very much for this MOD. I wish this MOD would be made a default feature of SMF. It saves us from clicking twice before reaching the New Topic button.
Title: Re: New Topic Button on View Topic (Updated for SMF 2.0)
Post by: vbgamer45 on October 29, 2012, 01:39:26 PM
Glad you enjoy it!
Title: Re: New Topic Button on View Topic
Post by: SMFHacks.com Team on March 06, 2019, 03:38:32 PM
Update
Added support for SMF 2.1.x
Title: Re: New Topic Button on View Topic
Post by: Shades. on March 08, 2022, 09:33:02 PM
Any chance to update this for 2.1.1? O:)