News:

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

Main Menu

Now Playing

Started by Oldiesmann, April 14, 2005, 12:57:06 PM

Previous topic - Next topic

Oldiesmann

Link to Mod

This mod allows your users to specify what they're currently listening to everytime they post. The information is then displayed along with the message.

Features:
Admin can specify the image to display next to what the user entered
Admin can also choose custom text to display between the image and what the user entered (default is no text)
"Now Playing" field on quick reply box - it only makes sense :)
Ability to preview and edit "Now Playing" information when previewing / editing the post.

Update: Version 1.1 Released! (July 21st, 2005).

New Features in 1.1:
Added "Now Playing" information to the "Topic Review" area (when posting a reply to a message)
Added "Now Playing" information to the "Show Posts" area of the profile (so you can track a person's listening habits ;)
Added support for 1.1 Beta 3 Public

Fixes
Fixed some HTML coding mistakes. Things should look a bit nicer now.

Everything has been combined into one archive - whether you're upgrading, installing it on a 1.0.x board or installing it on a 1.1 Beta 3 Public board, you just need to download the archive and SMF will figure out what to do. I've also included a "help.txt" file with instructions on manual installation.

Demo at http://smf.oldiesmann.us (default theme only at the moment)
Michael Eshom
Christian Metal Fans

dtm.exe

Awesome mod :)!

-Dan The Man

Oldiesmann

Michael Eshom
Christian Metal Fans

Trekkie101

working well now and I love it  :)

Oldiesmann

Seems that the users on my board (christianindieforums.com) are also enjoying it. I do plan to add a bit more in the next version, so it's only going to get better... :)
Michael Eshom
Christian Metal Fans

deepgrey

I was looking around my board today, and I noticed this error.

8: Undefined index: nowplaying
File: /home/deepgrey/public_html/forum/Sources/Post.php
Line: 602

Odd thing is that it doesn't happen all the time, the mod works, and no one notices an error message.

Line 602 of Post.php is marked in italics:

      // Get the stuff ready for the form.
      $form_subject = $row['subject'];
      $form_message = preg_replace('|<br(?: /)?>|', "\n", $row['body']);
      $form_nowplaying = $row['nowplaying'];
      censorText($form_nowplaying);
      censorText($form_message);
      censorText($form_subject);

Cheers for the great mod.  I'm going to work on this some more.  I was just wondering if anyone else was getting this.

Oldiesmann

That's a known bug. Change that italicized line to this:

$form_nowplaying = $row['nowPlaying'];
Michael Eshom
Christian Metal Fans

Silme

#7
I was trying to install this mod and it wasn't showing up, so I uninstalled and re-installed a few times. Finally realized all I had to do was enable it *doh!* but now there are multiple now playing fields showing up when you go to post a new message.

Here's the error message we're getting:
duplicate column name now playing, file/home/silme/public_html/loons/Packages/temp/dbstuff.php Line 48

Any help on how to get rid of the extra fields would be greatly appreciated.  :)

zeek

Quote from: Silme on May 04, 2005, 11:12:05 AM
I was trying to install this mod and it wasn't showing up, so I installed and re-installed a few times. Finally realized all I had to do was enable it *doh!* but now there are multiple now playing fields showing up when you go to post a new message.

Here's the error message we're getting:
duplicate column name now playing, file/home/silme/public_html/loons/Packages/temp/dbstuff.php Line 48

Any help on how to get rid of the extra fields would be greatly appreciated.  :)

I'm having the same problem. However, I installed it and enabled it but the features wouldn't show up. Package Manager showed that it was installed ok without errors. So I uninstalled/reinstalled but it still wouldn't work. I tested by posting a couple of times, but never got the "Now playing" fields. I double checked the settings and that the mod was enabled but still nothing.

Now package manager shows that no mods are installed but now I have two "Now Playing" sections under "Edit Features and Options" in the admin area. Any idea on how to get rid of those?

Oldiesmann

#9
Never install the mod twice or you'll end up with problems. That "duplicate column" error is due to the mod already being installed. This mod only modifies the default theme. You will have to modify any other themes yourself.

However, please make sure you fully understand the XML format before continuing. It's slightly different than the boardmod format. The "position" attribute indicates where the code we're searching for should be in relation to what we're adding...

<search position="after"> means to add the code before the code we're searching for.
<search position="before"> means to add the code after the code we're searching for.
<search position="replace"> of course means to replace the code we're searching for with the code we're adding.

To get rid of the extra "now playing" section:

Sources/ModSettings.php

Find
array('heading', &$txt['nowplaying1']),
array('check', 'nowplayingEnabled'),
array('text', 'nowplaying_text', 30),
array('text', 'nowplaying_image', 30),


And remove one of those blocks (there should be two identical blocks of code there...)
Michael Eshom
Christian Metal Fans

meester fox

Is there a way to apply this mod to any theme aside from the default one?

The theme on my site is nothing way out there, it's rather close to the original. But what do I need to add (and where) in order for this mod to work with my current theme?
Qdork is my SMF/mkportal website. Nothing amazing. A few mods, iTunes giveaways, and decent members.

Oldiesmann

Download the package to your hard drive and extract modification.xml from the package. Then, open it in a standard text editor (such as WordPad) and look for the steps dealing with themes. You need to be aware though that <search position="after"> means to add the code before the code you're searching for and <search position="before"> means to add the code after the code you're searching for (the position indicates where the code you're searching for should be relative to what you're adding - not sure why it was done that way though).
Michael Eshom
Christian Metal Fans

reddragon300

It's definitely not working for me at all, in the default theme or my board theme. I am new to installing mods on SMF... but why weren't there any install instructions??

dtm.exe

Quote from: reddragon300 on June 18, 2005, 02:16:35 PM
It's definitely not working for me at all, in the default theme or my board theme. I am new to installing mods on SMF... but why weren't there any install instructions??

What version of SMF are you using?

You should try uploading the mod, then installing it, and then click ont he link that says [ Proceed ].  Many people, myself included, sometimes forget to click on that.

-Dan The Man

13shadesofgray

#14
I'm attempting to use this on my forum as well.  The text entry box shows up in the reply/modify area, but the text entry box has no descriptive text.  Also noticed that the Features/Option area in my Admin Panel does not display any text.   May be some ignorant questions, but...  I'm running 1.0.5 and have a customized Theme set as my default.  Could these two things be the culprit?

Any idea how to correct this so the descriptive text will display?  If the link is needed to check code, etc... please let me know.  Thanks :)

Colleen


Jako

Is there any way that when a member types what they're listening to, types whatever message they were typing, that the message goes to the according topic, but the music they typed in goes to a different topic, as in a "What Are You Listening To?" type topic?
Maximus: Brothers, what we do in life... echoes in eternity.


Oldiesmann

Jako - That would require quite a bit of modification, but I'll look into it if I get a chance. It would be better as a seperate mod, because things would get too complicated otherwise.

Also, I will be releasing a new version of this mod shortly (and it will be compatible with 1.1 Beta 3 Public).
Michael Eshom
Christian Metal Fans

Oldiesmann

Update: New version released. See first post for more details...
Michael Eshom
Christian Metal Fans

trenchteam

I wanted to update and when I did, I guess not all the coding left the forums.  I cant update the latest. Im using 1.05  I still have TWO BLANK LINES at the bottom of my quick reply box.  I want that removed. Where do I find the code for removing it.  I looked at the display template but I couldn't find anything there....  Heres what the quick reply looks like now. It has those two extra lines at the bottom.

http://www.shoyoroll.com/forum/index.php?topic=5167.0

Advertisement: