Page Index Toggle Pages: 1 Send TopicPrint
Hot Topic (More than 10 Replies) Move Board 1.1 (Read 6353 times)
Ronnie
Senior Member
****
Offline


And on that bombshell

Posts: 336
Location: Manchester
Joined: Dec 15th, 2001
Gender: Male
Move Board 1.1
Feb 6th, 2003 at 8:18pm
Print Post  
Here's a small mod I've finally got round to converting to BoardMod format. It works on SP1.2, not sure about earlier versions. Move Board allows you to change the category a board is in, using a dropdown box in the usual Edit Boards page. Quite useful and time-saving when re-arranging your boards and categories.

I've tested it a lot on SP1.2 and am confident there are no major problems, but would appreciate any feedback and thoughts, including any sarky comments about my code.
  

move_board_11.mod ( 5 KB | Downloads )
Back to top
WWWICQ  
IP Logged
 
Ronnie
Senior Member
****
Offline


And on that bombshell

Posts: 336
Location: Manchester
Joined: Dec 15th, 2001
Gender: Male
Register Bugfix
Reply #1 - Feb 6th, 2003 at 8:23pm
Print Post  
While I'm here, here's another little mod I just put together. Register Bugfix stops members who are logged in from using the register page. It might seem pedantic but at the moment you can sign up again while logged in which seems wrong to me.
  

register_bugfix.mod ( 0 KB | Downloads )
Back to top
WWWICQ  
IP Logged
 
Dummy Proof
God Member
*****
Offline


I hate Bosses!  Now get
to work!

Posts: 991
Location: Outside L.A.
Joined: Aug 8th, 2002
Gender: Male
Re: Move Board 1.1
Reply #2 - Feb 7th, 2003 at 3:22am
Print Post  
I can't speak for Ronnies Move Board Mod... but I stumbled accross his site a few months ago and came accross his code regarding moving boards. I used much of it in TripodYaBB version, I had to change a bit of it, but it really was made possible because of Ronnies code. To make a long story short... why this feature is not integrated in the base YaBB is beyond me!

The action of moving boards between categories is very often asked about in the YaBB support forum, and this seems so natural to be an included feature.

BTW I also integrated the Create Boards to use the drop down box to select the destination Category for a new board, rather than a Create Board section for each Category. This helps reduce the Edit Boards page greatly.

Glad to see you releasing this mod Ronnie.

Dummy Proof
  

Ya can Idiot proof it...
Ya can Dummy proof it...
But ya can never...
...Blonde proof it!
Back to top
WWW  
IP Logged
 
Dummy Proof
God Member
*****
Offline


I hate Bosses!  Now get
to work!

Posts: 991
Location: Outside L.A.
Joined: Aug 8th, 2002
Gender: Male
Re: Move Board 1.1
Reply #3 - Feb 7th, 2003 at 9:35pm
Print Post  
OK.. I tested out the mod and it appears to work fine. One suggestion though, you might want to move the hard coded text to the language file so as to accomodate language users other than english.

I don't care much for the "cramped" layout, but truth be told, the original "Modify Boards" layout page sux right from the get go anyways(IMHO).

Dummy
  

Ya can Idiot proof it...
Ya can Dummy proof it...
But ya can never...
...Blonde proof it!
Back to top
WWW  
IP Logged
 
Stewart Gilray
Full Member
***
Offline


Help me Obi-wan...

Posts: 196
Joined: Jul 9th, 2002
Gender: Male
Re: Move Board 1.1
Reply #4 - Feb 8th, 2003 at 3:03pm
Print Post  
I'm getting a REALLY weird bug with this...

I have 10 categorys on my forum...

If I want to move a board on say cat 5. I will only get a listing of the first 4 cats in the drop down...

If I want to move a board in cat 8. I will only get a listing of the first 7 cats in teh drop down...

Ideas on a postcard too...
  
Back to top
 
IP Logged
 
Ronnie
Senior Member
****
Offline


And on that bombshell

Posts: 336
Location: Manchester
Joined: Dec 15th, 2001
Gender: Male
Re: Move Board 1.1
Reply #5 - Feb 8th, 2003 at 3:06pm
Print Post  
I think you've just found a bug, and I have an idea why it might be. I'm off to test a few things now, I'll be back shortly to let you know what's wrong.
  
Back to top
WWWICQ  
IP Logged
 
Stewart Gilray
Full Member
***
Offline


Help me Obi-wan...

Posts: 196
Joined: Jul 9th, 2002
Gender: Male
Re: Move Board 1.1
Reply #6 - Feb 8th, 2003 at 3:13pm
Print Post  
I've been looking at it too, and I KNOW why it does it, but I'll let you fix it Smiley

You know you search for the cat the board is in, well you STOP there, you don't go and continue the list...
  
Back to top
 
IP Logged
 
Dummy Proof
God Member
*****
Offline


I hate Bosses!  Now get
to work!

Posts: 991
Location: Outside L.A.
Joined: Aug 8th, 2002
Gender: Male
Re: Move Board 1.1
Reply #7 - Feb 8th, 2003 at 4:21pm
Print Post  
* Dummy Proof hopes this comes accross as nice as it's meant to be.  Smiley

Ronnie, you might want to release future mods in the BETA board first. (I really am not pointing my finger at you!  just a suggestion) Wink


Dummy
  

Ya can Idiot proof it...
Ya can Dummy proof it...
But ya can never...
...Blonde proof it!
Back to top
WWW  
IP Logged
 
Ronnie
Senior Member
****
Offline


And on that bombshell

Posts: 336
Location: Manchester
Joined: Dec 15th, 2001
Gender: Male
Re: Move Board 1.1
Reply #8 - Feb 8th, 2003 at 5:03pm
Print Post  
Future mods? I think that might be a bad idea. Wink Point taken though.

StewartGilray:
I've taken a look at the code, and tested it further on my test board with seven categories and three boards in each, and I'm not getting the problem you described. The dropdown box always lists all the other categories tha board can be moved to,and it moves them fine.

Are you running SP1.2? That is what I'm testing this mod on - I don't know if it works on earlier versions. Also, do you have any other mods installed which modify the .cat files?

If you can tell me exactly what you think the solution to this problem is I might get a better idea of why/what is happening.

I did find one bug though - the chomp line indicated below needs to be added in.

Code
Select All
foreach $curcat2 (@categories)
{
	chomp $curcat2;
	if ($curcat2 ne $curcat)
	{
		#get the full category name
		fopen(CATFILE, "$boardsdir/$curcat2.cat");
		$cat_name = <CATFILE>;
		fclose(CATFILE);
		chomp $cat_name;#added

		$yymain .= qq~<option value="$curcat2">$cat_name</option>\n~;
	}
}
 

  
Back to top
WWWICQ  
IP Logged
 
Stewart Gilray
Full Member
***
Offline


Help me Obi-wan...

Posts: 196
Joined: Jul 9th, 2002
Gender: Male
Re: Move Board 1.1
Reply #9 - Feb 8th, 2003 at 8:00pm
Print Post  
Cheers chap, it was the missing Chomp Smiley

Works tops now.
  
Back to top
 
IP Logged
 
Andrew Langland
Ex Member


Re: Move Board 1.1
Reply #10 - Feb 8th, 2003 at 8:19pm
Print Post  
That fixed an error I was getting. Smiley
  
Back to top
 
IP Logged
 
Dummy Proof
God Member
*****
Offline


I hate Bosses!  Now get
to work!

Posts: 991
Location: Outside L.A.
Joined: Aug 8th, 2002
Gender: Male
Re: Move Board 1.1
Reply #11 - Feb 8th, 2003 at 11:21pm
Print Post  
I was getting 300 errors because it would put a "newline" in the .ctb files.

Not sure why you have "\n$ctblines[1]" in the following line:
Code
Select All
fopen(FILE, ">$boardsdir/$FORM{'id'}.ctb", 1); print FILE qq~$FORM{'newcat'}\n$ctblines[1]~; fclose(FILE); 


When I removed "\n$ctblines[1]" from the above line it then worked properly. I also did this a few months ago when I put this routine in TripodYaBB.
As far as I can tell the .ctb files should only have one line in them, the category name that the board belongs to, so writing "\n$ctblines[1]" is not good or necessary as far as I can tell.

Dummy
  

Ya can Idiot proof it...
Ya can Dummy proof it...
But ya can never...
...Blonde proof it!
Back to top
WWW  
IP Logged
 
Ronnie
Senior Member
****
Offline


And on that bombshell

Posts: 336
Location: Manchester
Joined: Dec 15th, 2001
Gender: Male
Re: Move Board 1.1
Reply #12 - Feb 9th, 2003 at 12:19am
Print Post  
Dummy Proof: you're right. I wrote this mod so long ago I'd forgotten what some of it was about. That line was catering for an old mod I had which also edited the .ctb files.

I've now cleaned up that little bit so all it does is rewrite the .ctb file with the new categoy ID, plain and simple.

This fix, along with the added chomp line and moving the text to the .lng file, is included in v1.2 which I'm just about to post to the beta board. Feel free to let me know what's wrong with this version! Wink
  
Back to top
WWWICQ  
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint