Welcome, Guest. Please Login or Register.
March 29, 2024, 02:09:57 AM
Home Help Search Log in Register
News: If you are still using YaBB SE, please consider upgrading to SMF as soon as possible.

YaBB SE Community  |  Development  |  Completed mods  |  [Done 1.4.1 & 1.5.x] Change Hot Topic Size 1.0 « previous next »
Pages: [1] 2 Reply Ignore Print
Author Topic: [Done 1.4.1 & 1.5.x] Change Hot Topic Size 1.0  (Read 7457 times)
Jack.R.Abbit
Mod Team
YaBB God
*****
Posts: 553


RACE FOR SPENT!

[Done 1.4.1 & 1.5.x] Change Hot Topic Size 1.0
« on: October 17, 2002, 11:35:38 PM »
Reply with quote

This mod will add two inputs to the Mod Settings page to allow you to specify the number of replies required to mark a topic as hot or very hot.  I think I got the German, Finnish and Dutch translations right so if any one useing those languages wants to check it out, that'd be great.

changehotthreadsize - Updated 05/27/2003

Updates:
03/03/2003 - Updated for 1.5.1RC1

04/22/2003 - Updated for 1.5.1 Final

05/27/2003 - verified to work with 1.5.2 and 1.5.3

Enjoy!

I should mention that be sure to back up your data before applying this, or any, mod.  Everything I post works fine in my YaBB installation but your milage may vary.

-Jack
« Last Edit: May 27, 2003, 07:02:21 PM by Jack.R.Abbit » Logged

<--------  Mods by Jack  -------->
Package Server: http://www.modsbydesign.com/mods.by.jack/yabbse/ (now serving)


|----------------------------------------------|
|                                              |
|          DON'T PM ME FOR SUPPORT!             |
|                                              |
|----------------------------------------------|
littleminx
Noobie
*
Posts: 20


I'm a llama!

Re:[Beta 1.4.1] Change Hot Topic Size 1.0
« Reply #1 on: October 18, 2002, 06:55:21 AM »
Reply with quote

Jack, you rock. ;D

Worked perfectly for me and exactly what I was looking for. Thanks!
Logged
vegatopia
Noobie
*
Posts: 27


Seamos realistas, pidamos lo imposible!

Re:[Beta 1.4.1] Change Hot Topic Size 1.0
« Reply #2 on: October 23, 2002, 04:25:57 PM »
Reply with quote

Unfortunately it does not work for me. Strange thing is: it adds four inputfields to the Mod Settings page: twice 'Populair onderwerp formaat'  and twice 'Zeer populair onderwerp formaat' as well. Also remarkable: I can't save any values I put in the inputfields for the 'Populair onderwerp formaat' an  'Zeer populair onderwerp formaat'. What it does do is: put a very hot topic icon in front of all threads, even those with 0 replies.

Any ideas what's wrong?
 

 
Logged
David
Destroyer Dave
Global Moderator
YaBB God
*****
Posts: 5761


I'm not a llama!

WWW
Re:[Beta 1.4.1] Change Hot Topic Size 1.0
« Reply #3 on: October 23, 2002, 04:29:34 PM »
Reply with quote

Sure you didn't run the mod installer twice?
Logged

vegatopia
Noobie
*
Posts: 27


Seamos realistas, pidamos lo imposible!

Re:[Beta 1.4.1] Change Hot Topic Size 1.0
« Reply #4 on: October 23, 2002, 06:13:44 PM »
Reply with quote

I installed several times, but as far as I now I deinstalled the mod succesfully. How can I check if there are still two hot-topic-mods installed?
Logged
David
Destroyer Dave
Global Moderator
YaBB God
*****
Posts: 5761


I'm not a llama!

WWW
Re:[Beta 1.4.1] Change Hot Topic Size 1.0
« Reply #5 on: October 23, 2002, 06:46:03 PM »
Reply with quote

Look through the .mod file in a text editor and apply it by hand.  See if the stuff it adds is in your source files or not.
Logged

Jack.R.Abbit
Mod Team
YaBB God
*****
Posts: 553


RACE FOR SPENT!

Re:[Beta 1.4.1] Change Hot Topic Size 1.0
« Reply #6 on: October 23, 2002, 06:48:19 PM »
Reply with quote

A quick way to check is to open up your dutch.lng file and search for "Zeer populair onderwerp formaat".  if you find it twice... you have it installed twice.   if you find it thrice... you have it installed thrice.  and so on.

As for the issue of fixing this... best answer is to be sure you don't install something you have already installed.  This is why PacMan warns you if it thinks you already have installed it.  If you choose to ignore this warning... that is your choice.

In your case it is too late for that so the next best answer would be to go in manually and reverse the changes that the mod has made.  To do this, download the .zip version of the mod and look at the modification.mod file.  it contains all the instructions the PacMan uses to perform the mod.  Comb through the few files that it modified and look for the changes it has made and reverse them.

You will also want to check your yabbse_settings table.  The mod makes two entries into this: "hotThreadSize" and "veryHotThreadSize".  Since I check for them before adding them, regardless of how many times you install, reinstall or uninstall, the mod should only have created one set of these.  If you have more than one set... let me know.  That would be a problem.

And of course the questions beg to be asked... Why did you run the installer several times? and Did you back things up before doing it?

-Jack
Logged

<--------  Mods by Jack  -------->
Package Server: http://www.modsbydesign.com/mods.by.jack/yabbse/ (now serving)


|----------------------------------------------|
|                                              |
|          DON'T PM ME FOR SUPPORT!             |
|                                              |
|----------------------------------------------|
vegatopia
Noobie
*
Posts: 27


Seamos realistas, pidamos lo imposible!

Re:[Beta 1.4.1] Change Hot Topic Size 1.0
« Reply #7 on: October 23, 2002, 09:01:06 PM »
Reply with quote

Quote from: Jack.R.Abbit on October 23, 2002, 06:48:19 PMA quick way to check is to open up your dutch.lng file and search for "Zeer populair onderwerp formaat".  if you find it twice... you have it installed twice.

Well it says:

$txt[454] = "Populair onderwerp (Meer dan $hotThreadSize reacties)";
$txt[4542] = "Populair onderwerp formaat";
$txt[455] = "Zeer populair onderwerp (Meer dan $veryHotThreadSize reakties)";
$txt[4552] = "Zeer populair onderwerp formaat";


But (and I might be saying something completely nonsensical now) isn't that exactely what the mod does? When I look at the code it says:

<file>
dutch.lng
</file>

<search>
$txt[454] = "Populair onderwerp (Meer dan 15 reacties)";
$txt[455] = "Zeer populair onderwerp (Meer dan 25 reacties)";
</search>

<replace>
$txt[454] = "Populair onderwerp (Meer dan $hotThreadSize reacties)";
$txt[4542] = "Populair onderwerp formaat";
$txt[455] = "Zeer populair onderwerp (Meer dan $veryHotThreadSize reakties)";
$txt[4552] = "Zeer populair onderwerp formaat";
</replace>


I also looked at the yabbse_settings table as you said to see if I coulkd find any duplicates, but the strange thing is: there are no "hotThreadSize" entries whatsoever in this table! &-)


QuoteAnd of course the questions beg to be asked... Why did you run the installer several times? and Did you back things up before doing it?

Kinda foolish: I had installed the mod but hadn't checked out if it worked ok or not, then I tried to run an upgrade script from phpBB 1.4.1. to yabbse, which kinda worked, but not as good as expected. So I emptied the database, put back the old yabbse-files and reinstalled the old database. Then I noticed this hotread-thingie wasn't working properly. I deinstalled it and installed it again. That's the story.
Logged
Jack.R.Abbit
Mod Team
YaBB God
*****
Posts: 553


RACE FOR SPENT!

Re:[Beta 1.4.1] Change Hot Topic Size 1.0
« Reply #8 on: October 23, 2002, 10:06:12 PM »
Reply with quote

Whoa... I think you have taken a wrong turn somewhere.  You speak of running some other  upgrade script after the mod. and then emptying your database and putting back the old Yabbse files and reinstalling the old Yabbse databases.  Perhaps you will need to go through your files by hand and do some searching and hand modding.  sorry for this but I can't take any responsiblity if you have done the things I think you are telling me you've done.

The mod only touches a few files and it only adds a little bit of code in a few places.  open the mod file and just take it step by step.  Open the first file listed.  if the mod file has a "search and replace", you will want to search for either of the blocks of code (as the mod may or may not have performed the replace) and correct it accordingly.  If it is a "search and add" or a "search and before" block you should be able to just search for the searchable code. And look either before or after it for the added code.  If you find the added code, remove it.  Be sure to search the entire document as the PacMan would have done the desired action for each instance of the searched code.  Repeat this process for every <search> block for every php file listed in the mod file.  Upload these files to your server.  You say the "hotthreadsize" entries are not in your settings table so thats fine.  If you do all of this properly, you should have successfully removed all changes for the Change Hot Topic Size mod.  Browse about in your board to be sure that things are back to normal.  If they are, then you should be safe to reinstall the mod.  if not, then...  i don't know.  :-\

-Jack
Logged

<--------  Mods by Jack  -------->
Package Server: http://www.modsbydesign.com/mods.by.jack/yabbse/ (now serving)


|----------------------------------------------|
|                                              |
|          DON'T PM ME FOR SUPPORT!             |
|                                              |
|----------------------------------------------|
vegatopia
Noobie
*
Posts: 27


Seamos realistas, pidamos lo imposible!

Re:[Beta 1.4.1] Change Hot Topic Size 1.0
« Reply #9 on: October 23, 2002, 10:40:40 PM »
Reply with quote

Quote from: Jack.R.Abbit on October 23, 2002, 10:06:12 PMsorry for this but I can't take any responsiblity if you have done the things I think you are telling me you've done.

No, I don't blame you in any way Jack, it's my own stupid fault ofcourse ;-)

It's not that bad though, cause YaBB SE is only on my machine for testing purposes. Is's not yet in any "production environment".

But just wondering: why is the mod searching for two entries ($txt[454] and $txt[455]) and replacing it with four entries ($txt[454], $txt[4542], $txt[455] and $txt[4552] ?
Logged
Jack.R.Abbit
Mod Team
YaBB God
*****
Posts: 553


RACE FOR SPENT!

Re:[Beta 1.4.1] Change Hot Topic Size 1.0
« Reply #10 on: October 23, 2002, 10:51:22 PM »
Reply with quote

Quote from: vegatopia on October 23, 2002, 10:40:40 PMBut just wondering: why is the mod searching for two entries ($txt[454] and $txt[455]) and replacing it with four entries ($txt[454], $txt[4542], $txt[455] and $txt[4552] ?

Within $txt[454] and $txt[455] I needed to replace the 15/25 with the proper variables so that the text at the bottom of the forum will have the proper label for the amount of replies for the hot and very hot topics.  Plus, I needed to add $txt[4542] and $txt[4552] for the labels that display next to the text fields that are added to the admin area.  I decided to wrap it all into one "search and replace" to minimize the number of steps that PacMan had to follow.

I hope you get it sorted out.

-Jack
Logged

<--------  Mods by Jack  -------->
Package Server: http://www.modsbydesign.com/mods.by.jack/yabbse/ (now serving)


|----------------------------------------------|
|                                              |
|          DON'T PM ME FOR SUPPORT!             |
|                                              |
|----------------------------------------------|
vegatopia
Noobie
*
Posts: 27


Seamos realistas, pidamos lo imposible!

Re:[Beta 1.4.1] Change Hot Topic Size 1.0
« Reply #11 on: October 24, 2002, 08:53:54 PM »
Reply with quote

I edited the files back to their original state and noticed that some files had double entries, wheras some files had no entries at all...

Well, everything should be back to normal agian, and I'm going to try to run the mod again. Should it create two new files (Packages/modification.php and Packages/modification.txt) at the end?  

Edit:
Although I restored the files, when I try to reinstall the mod it says:

Apply mod
That mod is already installed!

[ I know it isn't installed, so install it anyway ]
« Last Edit: October 24, 2002, 09:06:20 PM by vegatopia » Logged
vegatopia
Noobie
*
Posts: 27


Seamos realistas, pidamos lo imposible!

Re:[Beta 1.4.1] Change Hot Topic Size 1.0
« Reply #12 on: October 24, 2002, 09:17:59 PM »
Reply with quote

Nope, still have problems. There are no double entries in Installed 'Mods' Settings and Options now, but it won't remember the values I fill in when I push the save-button.

I imagine that standard settings are zero because all threads, even those with no replies at all, are indicated as being 'very hot topic'.

edit:
Remarkable:  modification.mod, modification.php and modification.txt are in a directory called Packages, which is a subdirectory of Sources. Is that the way it should be? Or should it be in the Packages-dir which is a subdir of the main Yabbse-dir?
« Last Edit: October 24, 2002, 09:33:43 PM by vegatopia » Logged
Jack.R.Abbit
Mod Team
YaBB God
*****
Posts: 553


RACE FOR SPENT!

Re:[Beta 1.4.1] Change Hot Topic Size 1.0
« Reply #13 on: October 24, 2002, 10:03:56 PM »
Reply with quote

Quote from: vegatopia on October 24, 2002, 08:53:54 PMShould it create two new files (Packages/modification.php and Packages/modification.txt) at the end?
I don't think "create" is the right word.  After the PacMan has fnished the install, it should clear these files away.  They are part of the package.  The .txt file is what you read right before you install the mod, example "This mod adds two inputs to the Mod Settings page that lets you specify the number of replies required for a thread to be marked as Hot or Very Hot"  The .php file has the code needed to create two new entries into your settings table.


Quote from: vegatopia on October 24, 2002, 08:53:54 PMEdit:
Although I restored the files, when I try to reinstall the mod it says:

Apply mod
That mod is already installed!

[ I know it isn't installed, so install it anyway ]

The PacMan keeps a list of mods that it has installed.  If it successfully completes an uninstall, the mod should be removed from the list.  By doing an uninstall by hand, PacMan did not know to remove it from the list.


Quote from: vegatopia on October 24, 2002, 09:17:59 PMNope, still have problems. There are no double entries in Installed 'Mods' Settings and Options now, but it won't remember the values I fill in when I push the save-button.

I imagine that standard settings are zero because all threads, even those with no replies at all, are indicated as being 'very hot topic'.
Double check that those two hottopic entries were made in the settings table.  If they do not exist, the can't be updated when you hit save.


Quote from: vegatopia on October 24, 2002, 09:17:59 PMedit:
Remarkable:  modification.mod, modification.php and modification.txt are in a directory called Packages, which is a subdirectory of Sources. Is that the way it should be? Or should it be in the Packages-dir which is a subdir of the main Yabbse-dir?
I would think they should not be in there.  they actually should not really be seen since PacMan is supposed to delete them when finished.  What version of YabbSE are you running?  What happens when you uninstall it now?  And please tell me you kept a clean copy of the file somewhere to make it easier to recover from a possible disaster.  ;)

-Jack
Logged

<--------  Mods by Jack  -------->
Package Server: http://www.modsbydesign.com/mods.by.jack/yabbse/ (now serving)


|----------------------------------------------|
|                                              |
|          DON'T PM ME FOR SUPPORT!             |
|                                              |
|----------------------------------------------|
vegatopia
Noobie
*
Posts: 27


Seamos realistas, pidamos lo imposible!

Re:[Beta 1.4.1] Change Hot Topic Size 1.0
« Reply #14 on: October 25, 2002, 08:57:04 PM »
Reply with quote

Quote from: Jack.R.Abbit on October 24, 2002, 10:03:56 PMDouble check that those two hottopic entries were made in the settings table.  If they do not exist, the can't be updated when you hit save.


Nope, nothing in the yabbse_settings table that indicates the existence of hottopic or very hottopic. Does that give us a clue?


[quote ]
I would think they should not be in there.  they actually should not really be seen since PacMan is supposed to delete them when finished.  What version of YabbSE are you running?
Quote

Could it be that PacMan isn't working properly? BTW: can I delete the files mentioned? Or do I have to empty them? I'm using YabbSE 1.4.1.

QuoteWhat happens when you uninstall it now?  And please tell me you kept a clean copy of the file somewhere to make it easier to recover from a possible disaster.  ;)

It's completely gone now. I've used the backups PacMan made for me, so everything is back to normal again. What would be the best way to proceed now? Install the mod by hand? I know how to do that for the most part, my only doubts are the last two things: Packages/modification.php and Packages/modification.txt. 1) Should I create these files and is the text in changehotthreadsize.mod.yp the only thing that should be in them? 2) Where do these files belong? In a subdirectory of Sources? Or in a subdirectory of the main Yabbse-dir?
Logged
Pages: [1] 2 Reply Ignore Print 
YaBB SE Community  |  Development  |  Completed mods  |  [Done 1.4.1 & 1.5.x] Change Hot Topic Size 1.0 « previous - next »
 


Powered by MySQL Powered by PHP YaBB SE Community | Powered by YaBB SE
© 2001-2003, YaBB SE Dev Team. All Rights Reserved.
SMF 2.1.4 © 2023, Simple Machines
Valid XHTML 1.0! Valid CSS

Page created in 0.038 seconds with 19 queries.