Ask The Trades
https://www.askthetrades.co.uk/cgi-bin/yabb/YaBB.pl
Public Forum >> The Forum >> red crosses
https://www.askthetrades.co.uk/cgi-bin/yabb/YaBB.pl?num=1136490510

Message started by scotspark on Jan 5th, 2006, 11:19am

Title: red crosses
Post by scotspark on Jan 5th, 2006, 11:19am

what are the red crosses on the Right hand side of the diy and public forums???????????????????????

Title: Re: red crosses
Post by thescruff on Jan 5th, 2006, 11:25am


wrote on Jan 5th, 2006, 11:19am:
what are the red crosses on the Right hand side of the diy and public forums???????????????????????



This feature is not functioning yet - Ask Lectrician for details!

??? ??? ???

Title: Re: red crosses
Post by Lurch on Jan 5th, 2006, 11:59am

Should this not be in 'The Forum' section?

Title: Re: red crosses
Post by billythekid on Jan 5th, 2006, 7:47pm

Lec cant work out a simple IF statement ;) ;), its eventually gonna allow you to toggle the new picture thingies display on/off.

btk(asked Lectrician for details!)

Title: Re: red crosses
Post by billythekid on Jan 5th, 2006, 7:48pm

and consider it done Lurch... lol



btk

Title: Re: red crosses
Post by Lectrician on Jan 5th, 2006, 8:19pm

Lectrician has mastered the if, or and ands ;)

He has written the code, and is ready to upload - the one thing he hasn't sorted, which bugs him is:

-when you click the red cross to hide the pics, if you are at the bottom of the index (in respect of scroll), once clicked, you jump to the top - everything works A-OK, this little thing just bugs me.

Also, need to add some code so when (if ever) we delete forum categories (trade, public, diy), the data still remains in the users profile.  This needs to be removed as categories are removed - not hugely important just now.

OK - will upload script soon!

Title: Re: red crosses
Post by Lectrician on Jan 5th, 2006, 8:21pm

OK - uploaded and working.

Turn the images on and off at your own pleasure!


If anyone is interested - here is the PL file I have had to write - called IndexImage.pl


Code:
sub picstat{

     
                 
#find out if the user currently has this catagories board pictures hidden or displayed.

     
  $curcat = $INFO{'cat'};
  if (-e "$memberdir/$username.img" ) { require "$memberdir/$username.img"; }
  if ($removepic{$curcat} eq "1"){

#we now need to delete the entry from the users .img file to turn pics for this category off.
                 
     fopen(FILE, "$memberdir/$username.img");
     @userimg = <FILE>;
     fclose(FILE);
     chomp @userimg;
     my @newuserimg = ();
     foreach $userimgdat(@userimg) {
        chomp $userimgdat;
        $compare="removepic{'$curcat'}";
        unless ( index($userimgdat, $compare) != -1 ){push (@newuserimg, $userimgdat);}
     }
     chomp @newuserimg;
     fopen(FILE, ">$memberdir/$username.img");
     foreach $newuserimgdat(@newuserimg) {
        chomp $newuserimgdat;
        print FILE "$newuserimgdat\n";
     }
     fclose(FILE);

       $yySetLocation = qq~$cgi~;
       &redirectexit;
           
  }else{

#we now need to add the entry to the users .img file to turn the pics for this category on.

     fopen(FILE, "$memberdir/$username.img");
     @userimg = <FILE>;
     fclose(FILE);
     chomp @userimg;

#check to make sure the user has a .img file.  If not, create array template ready to add strings.

       if ($userimg[0] eq ""){
        push (@userimg, "#users board image dat.  If listed, the categories board images will not be displayed\n");
        push (@userimg, "1;\n");            
     }

# # # # # #

     foreach $userimgdat(@userimg) {
        chomp $userimgdat;
        unless ( index($userimgdat, '#users') != -1 ){push (@newuserimg, $userimgdat);}
     }
     $newentry=qq~\$removepic{'$curcat'}="1";~;
     unshift (@newuserimg, $newentry);      
     fopen(FILE, ">$memberdir/$username.img");
     print FILE "#users board image dat.  If listed, the categories board images will not be displayed\n";
     foreach $newuserimgdat(@newuserimg) {
        chomp $newuserimgdat;
        print FILE "$newuserimgdat\n";
     }
     fclose(FILE);

       $yySetLocation = qq~$cgi~;
       &redirectexit;
  }

}

1;

Title: Re: red crosses
Post by billythekid on Jan 5th, 2006, 8:27pm

http://www.askthetrades.co.uk/cgi-bin/yabb/YaBB.pl#Public

instead of

http://www.askthetrades.co.uk/cgi-bin/yabb/YaBB.plcat=Public

or whatever the variable strings are for that.(the link from public etc at the top of each board/topic page.)

;)

btk

Title: Re: red crosses
Post by hamilton on Jan 5th, 2006, 8:30pm

I need a paracetamol.    ???

Title: Re: red crosses
Post by Lectrician on Jan 5th, 2006, 8:34pm


wrote on Jan 5th, 2006, 8:27pm:
http://www.askthetrades.co.uk/cgi-bin/yabb/YaBB.pl#Public

instead of

http://www.askthetrades.co.uk/cgi-bin/yabb/YaBB.plcat=Public

or whatever the variable strings are for that.(the link from public etc at the top of each board/topic page.)

;)

btk



That would depend where you clicked - so would need to carry the info from click into script, keep it as a string in script, and place string into redirect sub.

Umm - not tonight......

;)

Title: Re: red crosses
Post by Lectrician on Jan 5th, 2006, 8:41pm

In fact - this may take a while longer to sort.

The cat string is actually already carried into the script, this his how it can save the data to make sure the pic for that cat is not displayed.

The difficulty will be that although the YaBB.pl#public will take the script back to the top of the public board, perl scripts see the # as a marker for plain test for writting headers/reminders etc in the script.  It ignores everything on that line after the hash.

Even if I try to make a string which contains the hash as an HTML element, it marks it as invisible to the coding.

Umm........

Title: Re: red crosses
Post by billythekid on Jan 5th, 2006, 8:43pm

"put #it# in #quotes#"


btk

Title: Re: red crosses
Post by billythekid on Jan 5th, 2006, 8:50pm

or i dont know if you have an evaluate identifier but if i was scripting that in my native language i could use $eval(#,0) i.e evaluate whats in the brackets zero times

which would probably be $eval($chr(35),0) since character 35 evaluates to #.

btk

Title: Re: red crosses
Post by Lectrician on Jan 5th, 2006, 8:51pm

Tried that - either the YaBB sub doesn't like it, or Perl.

Looking at javascript go back command, but interfacing that to perl isn't easy either.

Will get there....



It's only a niggle anyway - once clicked, you aint going to be clicking everyday - usually!

Title: Re: red crosses
Post by billythekid on Jan 5th, 2006, 8:51pm

Sorry Hammy  :D

btk

Title: Re: red crosses
Post by LSpark on Jan 5th, 2006, 8:54pm


wrote on Jan 5th, 2006, 8:21pm:
Turn the images on and off at your own pleasure!

But but but


Quote:
An Error Has Occured!

You are not allowed to access this section.
Please register an account, or contact an administrator
if you feel this is an error.

:-X

Title: Re: red crosses
Post by Lurch on Jan 5th, 2006, 8:59pm

*cough* dodgy software *cough*

;) ;D

Title: Re: red crosses
Post by LSpark on Jan 5th, 2006, 9:03pm

Dodge something, must be the pizza! *pukes*

Title: Re: red crosses
Post by billythekid on Jan 5th, 2006, 9:04pm

LMFAO superb, if your not being blocked from PM links you are being blocked by regular in-forum ones!! ever think someone has it in for you LS?

btk

Title: Re: red crosses
Post by billythekid on Jan 5th, 2006, 9:07pm

Had another idea Lec although pardon my ignorance of HTML before i begin! could there be a page set up with the two addresses that dont send you to the right frames that are simply redirect pages?

not a fix but a workaround maybe??

I am guessing NOT since theres no 404 with it...

btk

Title: Re: red crosses
Post by billythekid on Jan 5th, 2006, 9:11pm

or maybe yes since all ?cat= 's return you to the homepage i.e
http://www.askthetrades.co.uk/cgi-bin/yabb/YaBB.pl?cat=btk
there is a script somewhere intercepting(or not??)

btk

Title: Re: red crosses
Post by Lectrician on Jan 5th, 2006, 9:15pm


wrote on Jan 5th, 2006, 8:54pm:
But but but

:-X



Where did that error come from LS??

Title: Re: red crosses
Post by billythekid on Jan 5th, 2006, 9:18pm

from here

;D ;D

btk

Title: Re: red crosses
Post by hamilton on Jan 5th, 2006, 9:26pm

WTF   ???

I must have fell asleep and woke up on the planet Zog.

Forget the paracetamol, I'm off for a very large Balvenie.

Title: Re: red crosses
Post by Lectrician on Jan 5th, 2006, 9:27pm

Now I am lost - why are you trying to view a board called lectrician ???

Wooosh.....over my head.....must have missed something!?!

Title: Re: red crosses
Post by LSpark on Jan 5th, 2006, 9:28pm


wrote on Jan 5th, 2006, 9:04pm:
LMFAO superb, if your not being blocked from PM links you are being blocked by regular in-forum ones!! ever think someone has it in for you LS?

btk

Yep, that and the pizza, it's ever since looking at that picture  ;)


wrote on Jan 5th, 2006, 9:27pm:
Now I am lost - why are you trying to view a board called lectrician ???

Wooosh.....over my head.....must have missed something!?!

I don't frigging know, there I was snooping around, minding my own business and then it hit me, no access to room 101..  ;D

No.. actualy it happened when I turned both picture sets off via tab, and then tried to return to this thread via the last post posted bottom of index..

btw lecc, anything else constitutes something billy said, nothing to do with me!

Title: Re: red crosses
Post by Lectrician on Jan 5th, 2006, 9:29pm

I really am lost - PM's blocked.....eh??

Title: Re: red crosses
Post by billythekid on Jan 5th, 2006, 9:53pm

lmfao, i dont think i'll explain just to keep you in this state, keeps postings up... lol

btk

Title: Re: red crosses
Post by Lurch on Jan 5th, 2006, 9:59pm

Yeah, easy peasy. Can't understand why you haven't done it. ;)

Title: Re: red crosses
Post by billythekid on Jan 5th, 2006, 10:01pm


wrote on Jan 5th, 2006, 9:59pm:
Yeah, easy peasy. Can't understand why you haven't done it. ;)

I'd say green, but I would have thought that obvious.

btk

Title: Re: red crosses
Post by Lurch on Jan 5th, 2006, 10:05pm

No need to thank me.  :-X

Title: Re: red crosses
Post by billythekid on Jan 5th, 2006, 10:20pm

only when it rains! lol (sorry, sometimes when it's just moist too)

btk  8)

Title: Re: red crosses
Post by Lurch on Jan 5th, 2006, 10:27pm

/squelch

Title: Re: red crosses
Post by Scrit on Jan 5th, 2006, 10:32pm

Funny - I spent years trying to get AWAY from the IT industry. Find myself a good TRADES forum, and whammo!, up to my ears in quiche and sandals talk. Have you ever had that feeling of deja vu?..... ;D ;D

Scrit

Title: Re: red crosses
Post by billythekid on Jan 5th, 2006, 10:54pm

my mate has a theory on deja vu. something to do with the brain having long term memory and short term memory and deja vu is when you take something in to your long term memory that should have gone in short term memory by short-circuit or whatever.

btk

Title: Re: red crosses
Post by hamilton on Jan 5th, 2006, 11:54pm

I have a strange feeling that you have already said that.  :-/

Title: Re: red crosses
Post by Lectrician on Jan 6th, 2006, 7:35am

Joys of IT.....


LS found a bug - If you turn pics off, you then can't use the last post feature at the bottom of the index screen - not sure why yet - will look at that later.

Have removed the buttons for a but, until it is sorted!

Title: Re: red crosses
Post by Lurch on Jan 6th, 2006, 12:07pm

Git, I have never ever used the last 20 posts thing so for me, everything was hunky dory until I logged on today. :(

How about using a decent board, you might get more people using it if it isn't so clunky and awkward. :)

Title: Re: red crosses
Post by JerryD on Jan 6th, 2006, 1:18pm


wrote on Jan 5th, 2006, 8:50pm:
or i dont know if you have an evaluate identifier but if i was scripting that in my native language i could use $eval(#,0) i.e evaluate whats in the brackets zero times

which would probably be $eval($chr(35),0) since character 35 evaluates to #.

btk



Yes, I was thinking along these lines....  ??? ??? ???

or perhaps ωΔη±ξ⅞Λ + τΣρτΠΥ since character 89 = κΛΓψΨΦΣ divided by the number of tiles on my roof

Signed:  JerryD (bricklayer)  ::)

Title: Re: red crosses
Post by WOLF on Jan 6th, 2006, 2:04pm


wrote on Jan 6th, 2006, 1:18pm:
or perhaps ωΔη±ξ⅞Λ + τΣρτΠΥ since character 89 = κΛΓψΨΦΣ divided by the number of tiles on my roof

Signed:  JerryD (bricklayer)  ::)


if you don't stop swearing, they will mod ya dear chap!!!LOL ;D

Title: Re: red crosses
Post by Lectrician on Jan 6th, 2006, 4:32pm


wrote on Jan 6th, 2006, 12:07pm:
Git, I have never ever used the last 20 posts thing so for me, everything was hunky dory until I logged on today. :(

How about using a decent board, you might get more people using it if it isn't so clunky and awkward. :)



I know you dis-like our software lurch, but the biggest thing with this website is that it is run as cheaply as possible.  The server is in a loft, and all the software that is running is free.  Other forums may be free, but require a platform that costs....

YaBB works well, and the newer 2.1 version is extremely fast, and less buggy - maybe we will move over to that at some point.....

In the mean time, most of the alterations to the forum have been coded by hand - this last pic button mod is the latest example - and I can't get it right everytime ;D

Title: Re: red crosses
Post by billythekid on Jan 6th, 2006, 4:59pm

didnt i suggest a move to v2 last year??  pull yer finger out man! lol

btk

Title: Re: red crosses
Post by Lectrician on Jan 6th, 2006, 5:05pm

LOL - Yabb 2 actually has less features build in from standard - many of the things we use on this board are not available on yabb2 yet - it is best to wait until some mods have been written, and tested, before changing.



Bug fixed on pic buttons - a clash of global board and cat strings.  Buttons back and working.  Also managed to set the HTML anchor hashes to return back tot he top of the category where you clicked the button, although I still want to use javascript to make it return, as this will return you to exactly the same position of scroll......

Title: Re: red crosses
Post by Lurch on Jan 6th, 2006, 5:51pm


wrote on Jan 6th, 2006, 4:32pm:
I know you dis-like our software lurch, but the biggest thing with this website is that it is run as cheaply as possible.  The server is in a loft, and all the software that is running is free.  Other forums may be free, but require a platform that costs....


I know, I just feel the urge to point it out every now and again. ;)

Excellent job being done, despite the software. ;D

Title: Re: red crosses
Post by billythekid on Jan 9th, 2006, 4:53am

http://reg.imageshack.us/content.php?page=syndicate

how about that on the post pages to make uploading pictures easier for guests/regulars. would help with diagnosing problems and things as well as convenient for us to put our funnies!

btk

Title: Re: red crosses
Post by Lectrician on Jan 9th, 2006, 7:20am

That is something I have looked at recently :-)

Will look a little closer - atleast with the image shack uploader the pic is stored on their server, not ours - we need all the bandwidth we can get!

Ask The Trades » Powered by YaBB 2.3!
YaBB © 2000-2008. All Rights Reserved.