Page Index Toggle Pages: 1 [2] 3  Send TopicPrint
Very Hot Topic (More than 25 Replies) Simple Manual Weather Mod V0.001 (Read 13594 times)
thecaretaker
Junior Member
**
Offline


I am thecaretaker

Posts: 87
Location: 1066 Country
Joined: Dec 5th, 2002
Gender: Male
Re: Simple Manual Weather Mod V0.001
Reply #15 - Jul 23rd, 2004 at 9:36pm
Print Post  
mmm. It's cos I use the cgi version I think, not the pl. So I changed that to http://www.mysite.co.uk/cgi-bin/yabb/YaBB.cgi?action=weather

But tells me I have server error. This usually means somethings not type in correctly. Will check files again to see if I've missed anything.

Would what you have found effect this?!
  

Growing old is mandatory. Growing up is optional!
Back to top
WWW  
IP Logged
 
thecaretaker
Junior Member
**
Offline


I am thecaretaker

Posts: 87
Location: 1066 Country
Joined: Dec 5th, 2002
Gender: Male
Re: Simple Manual Weather Mod V0.001
Reply #16 - Jul 23rd, 2004 at 9:41pm
Print Post  
OK, after playing with it, should I have put in http://www.mysite.co.uk/cgi-bin/yabb/YaBB.cgi?action=weather2

If I do that, it tries to load but get a message

Untrapped Error:
Can't locate object method "FORM" via package "forcast" at /home/sites/www.mysite. co.uk/web/cgi-bin/yabb/Sources/Subs.pl line 1304.
  

Growing old is mandatory. Growing up is optional!
Back to top
WWW  
IP Logged
 
astropilot
God Member
*****
Offline



Posts: 828
Location: Louisville
Joined: Jun 18th, 2003
Gender: Male
Re: Simple Manual Weather Mod V0.001
Reply #17 - Jul 23rd, 2004 at 9:47pm
Print Post  
Check this out...

I'll try to get this together late tonight.

http://www.valleynazarene.org/cgi-bin/yabb/YaBB.pl?board=;action=weather

I just really need to get.
  

"For I am not ashamed of the gospel of Christ..."
Romans 1:16
---
http://www.ssflynn.com
www.flynnfarmsofkentucky.com
Back to top
 
IP Logged
 
thecaretaker
Junior Member
**
Offline


I am thecaretaker

Posts: 87
Location: 1066 Country
Joined: Dec 5th, 2002
Gender: Male
Re: Simple Manual Weather Mod V0.001
Reply #18 - Jul 23rd, 2004 at 9:55pm
Print Post  
The layout is just perfect. Thanks. I get an error when I press save though.

Can't see anything on mine. Still trying to see if I can find anything obvious, but not having much luck so far Wink
  

Growing old is mandatory. Growing up is optional!
Back to top
WWW  
IP Logged
 
astropilot
God Member
*****
Offline



Posts: 828
Location: Louisville
Joined: Jun 18th, 2003
Gender: Male
Re: Simple Manual Weather Mod V0.001
Reply #19 - Jul 23rd, 2004 at 10:21pm
Print Post  
You know, this one might just work!  Cross your fingers.

astro-pilot
  

weather1.mod ( 5 KB | Downloads )

"For I am not ashamed of the gospel of Christ..."
Romans 1:16
---
http://www.ssflynn.com
www.flynnfarmsofkentucky.com
Back to top
 
IP Logged
 
thecaretaker
Junior Member
**
Offline


I am thecaretaker

Posts: 87
Location: 1066 Country
Joined: Dec 5th, 2002
Gender: Male
Re: Simple Manual Weather Mod V0.001
Reply #20 - Jul 23rd, 2004 at 10:23pm
Print Post  
Spotted a couple of errors. Still can't get it to work.

In board index
$weather[6].gif}"><BR>

Should be
$weather[6].gif"><BR>

In Subs.pl
fopen (FILE, ">vardir/weather.info", 1);

Should that be?:
fopen (FILE, ">$vardir/weather.info", 1);
  

Growing old is mandatory. Growing up is optional!
Back to top
WWW  
IP Logged
 
astropilot
God Member
*****
Offline



Posts: 828
Location: Louisville
Joined: Jun 18th, 2003
Gender: Male
Re: Simple Manual Weather Mod V0.001
Reply #21 - Jul 23rd, 2004 at 10:28pm
Print Post  
I fixed all the erros except the boardindex one.

This will give you something to play with.  But I really have to get back to church.  I'll work more in the morning.  The only thing to check is the boardindex stuff and the security issue.

astro-pilot
  

"For I am not ashamed of the gospel of Christ..."
Romans 1:16
---
http://www.ssflynn.com
www.flynnfarmsofkentucky.com
Back to top
 
IP Logged
 
thecaretaker
Junior Member
**
Offline


I am thecaretaker

Posts: 87
Location: 1066 Country
Joined: Dec 5th, 2002
Gender: Male
Re: Simple Manual Weather Mod V0.001
Reply #22 - Jul 23rd, 2004 at 10:44pm
Print Post  
I hand wrote the info file and fixed the missing '$' in the boardindex. and got it reading and posting the images on the index page.

Still can't work out why I can't the input page. Likewise, I'm cream crackered, so will take a fresh look in the morning.

It's looking right on the forum anyway. That's gotta be half way there!

Many thanks for your help. You've been a star to spend so much time with me Wink
  

Growing old is mandatory. Growing up is optional!
Back to top
WWW  
IP Logged
 
thecaretaker
Junior Member
**
Offline


I am thecaretaker

Posts: 87
Location: 1066 Country
Joined: Dec 5th, 2002
Gender: Male
Re: Simple Manual Weather Mod V0.001
Reply #23 - Jul 24th, 2004 at 7:45am
Print Post  
Way Hay, it's working a treat. You deserve a nice rest after that. Wink

I can see what you mean about security though. As it stands at the moment, anyone could play with it. It needs to be altered to only allow admin and moderators use it. I'll try and look at some of the other code to see how that's done. With any luck, it should be just a case of copying something to the start of the sub. If I sus it out, I'll post the fixed file here (just in case anyone is following this!) Grin

The only other possible improvement would be to have the previous values of weather.info loaded into the weather input page. But that would prolly take more programming than this mod deserves.

I really appreciate the help that you've given me. I've learnt some more stuff along the way.

You have a restful day now. and thanks again, I owe you one!! Wink
  

Growing old is mandatory. Growing up is optional!
Back to top
WWW  
IP Logged
 
thecaretaker
Junior Member
**
Offline


I am thecaretaker

Posts: 87
Location: 1066 Country
Joined: Dec 5th, 2002
Gender: Male
Re: Simple Manual Weather Mod V0.001
Reply #24 - Jul 24th, 2004 at 9:57am
Print Post  
Just to let you know, I've added a link (using correct yabb method) to the sub page that displays all the weather icons with there respective number for each icon for easy look-up.

I've stored it in the weathericon folder.

I've uploaded the latest working version HERE (it was too large to upload to the forum)
  

Growing old is mandatory. Growing up is optional!
Back to top
WWW  
IP Logged
 
astropilot
God Member
*****
Offline



Posts: 828
Location: Louisville
Joined: Jun 18th, 2003
Gender: Male
Re: Simple Manual Weather Mod V0.001
Reply #25 - Jul 24th, 2004 at 10:20am
Print Post  
So here is the latest beta with all the known fixes.  I'm still not sure if the BoardIndex code is correct plus I don't know where to add it in the file (can you tell me).

I've added just a baseline security to allow admins and gmod....others can be added later.

The previous values should be there now too (I keep leaving out that little "$").

Anyway, let me know about the boardindex code if its good or not and where to place it.  Plus, if we are gonig to make this a mod for everyone, you or I need to finish out the mod instructions, gather the pics, etc... and put that into a zip file and start a new thread ... but of course after we get everything ironed out (since you have everything, you could do it).

astro-pilot
  

weather3.mod ( 5 KB | Downloads )

"For I am not ashamed of the gospel of Christ..."
Romans 1:16
---
http://www.ssflynn.com
www.flynnfarmsofkentucky.com
Back to top
 
IP Logged
 
thecaretaker
Junior Member
**
Offline


I am thecaretaker

Posts: 87
Location: 1066 Country
Joined: Dec 5th, 2002
Gender: Male
Re: Simple Manual Weather Mod V0.001
Reply #26 - Jul 24th, 2004 at 11:38am
Print Post  
Just about to download that file. I must admit, now that you have shown me how to do this I have been tweaking it a little more to suit my own needs.

As for where to put the code in the boardindex. I have put mine just under the...

Code
Select All
 ## WHOSON MOD END ##  



...as I have that mod (and many others) installed. But when writting a mod, should I assume that the user has never installed any mods before?.

Will package it all up into a zip file and post in another thread when it's fully tested and working. Thanks again! Will report back re latest version.
  

Growing old is mandatory. Growing up is optional!
Back to top
WWW  
IP Logged
 
thecaretaker
Junior Member
**
Offline


I am thecaretaker

Posts: 87
Location: 1066 Country
Joined: Dec 5th, 2002
Gender: Male
Re: Simple Manual Weather Mod V0.001
Reply #27 - Jul 24th, 2004 at 12:11pm
Print Post  
It's working a charm. Just one final idea (please shout at me if this is impossible), but we discussed a link earlier on in this thread. I have added a text link to the bottom of the infomation that's displayed from the boardindex.

Code
Select All
<a href="$cgi;action=weather" target="_self"><BR> $txtwet{'17'}</a> 



$txtwet{'17'} being 'Update this weather information'

Is there an easy way to make this line only show if you are an admin or moderator?

Not to worry if there isn't, as non mods and admin can't see the page. But it would be a nice touch.

It's working perfectly, so once you get back to me with my last 2 points, I'll bag it up!

Many thanks!
  

Growing old is mandatory. Growing up is optional!
Back to top
WWW  
IP Logged
 
thecaretaker
Junior Member
**
Offline


I am thecaretaker

Posts: 87
Location: 1066 Country
Joined: Dec 5th, 2002
Gender: Male
Re: Simple Manual Weather Mod V0.001
Reply #28 - Jul 24th, 2004 at 3:36pm
Print Post  
Problem time!! My moderators can't see the page, only I can see it.
My forum moderators are all part of the 'forum admin' membergroup. I've tried adding a number of codes to the start of the subs routine, but none of them seem to work. ??? ???
  

Growing old is mandatory. Growing up is optional!
Back to top
WWW  
IP Logged
 
astropilot
God Member
*****
Offline



Posts: 828
Location: Louisville
Joined: Jun 18th, 2003
Gender: Male
Re: Simple Manual Weather Mod V0.001
Reply #29 - Jul 24th, 2004 at 4:08pm
Print Post  
Point #1 - When making a mod, you should make it for a clean version of YaBB (ie no mods).

Point #2 - Making the edit link invisible to all everyone except editors.  Find this code on BoardIndex.pl
Code
Select All
<td valign="top" align="left"><font size=1><img src="$imagesdir/weathericon/$txtwet{'1'}"><BR><img src="$imagesdir/weathericon/spacer.gif"><BR><img src="$imagesdir/weathericon/$weather[1].gif"><img src="$imagesdir/weathericon/spacer.gif"><img src="$imagesdir/weathericon/$weather[2].gif"><img src="$imagesdir/weathericon/spacer.gif"><img src="$imagesdir/weathericon/$weather[3].gif"><img src="$imagesdir/weathericon/spacer.gif"><img src="$imagesdir/weathericon/$weather[4].gif"><img src="$imagesdir/weathericon/spacer.gif"><img src="$imagesdir/weathericon/$weather[5].gif"><img src="$imagesdir/weathericon/spacer.gif"><img src="$imagesdir/weathericon/$weather[6].gif"><BR><BR>$weather[0] 


Replace it with
Code
Select All
<td valign="top" align="left"><font size=1><img src="$imagesdir/weathericon/$txtwet{'1'}"><BR><img src="$imagesdir/weathericon/spacer.gif"><BR><img src="$imagesdir/weathericon/$weather[1].gif"><img src="$imagesdir/weathericon/spacer.gif"><img src="$imagesdir/weathericon/$weather[2].gif"><img src="$imagesdir/weathericon/spacer.gif"><img src="$imagesdir/weathericon/$weather[3].gif"><img src="$imagesdir/weathericon/spacer.gif"><img src="$imagesdir/weathericon/$weather[4].gif"><img src="$imagesdir/weathericon/spacer.gif"><img src="$imagesdir/weathericon/$weather[5].gif"><img src="$imagesdir/weathericon/spacer.gif"><img src="$imagesdir/weathericon/$weather[6].gif"><BR><BR>$weather[0]~;
if ($settings[7] eq 'Administrator' || $settings[7] eq 'Global Moderator') {$yymain .= qq~<a href="$cgi;action=weather" target="_self"><BR> $txtwet{'17'}</a>~;
$yymain .= qq~ 



Point #3 - Your moderators wouldn't be able to see it because of the security.  You'll need to add them  to the feature.  

So in Subs (first line of the Weather sub) add this
Code
Select All
&& $settings[7] ne 'forum admin' 


and in the link feature for BoardIndex.pl explained above add this
Code
Select All
|| $settings[7] eq 'forum admin' 


to the appropiate lines of code.  As long as this matches the "membergroup name" found on line 8 of the your mods data files containing their profile, this should do want you need.

I'm looking forward to seeing the finished mod.  I do ask that you post it here first before starting a new thread advertising the mod.  Thanks.

You have any problems or issues, don't hesitate to let me know.

astro-pilot
  

"For I am not ashamed of the gospel of Christ..."
Romans 1:16
---
http://www.ssflynn.com
www.flynnfarmsofkentucky.com
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1 [2] 3 
Send TopicPrint