Welcome, Guest. Please Login or Register
Welcome To Ask The Trades!
Apr 29th, 2024, 4:13pm
Quote: There are two kinds of pedestrians: the quick and the dead.


Pages: 1 2 3 
Send Topic Print
red crosses (Read 25129 times)
scotspark
Trade Member
*****
Offline

mmmmm it's gonna cost
you!!
Posts: 3074


Total Thanks: 10
For This Post: 0


scotland, Scotland
scotland
Scotland

Gender: male

Trade: Electrician



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

brown to red and blue to f****&&&&ommited!!!!!!!!!!!!!!!!!!!!!!!!!!!
Thank User For This Post View members image gallery  
IP Logged
 
thescruff
Global Moderator
Trade Member
Author
*****
Offline

Who said plumbing was
easy.
Posts: 6037


Total Thanks: 147
For This Post: 0


Gender: male

Trade: Plumber



Re: red crosses
Reply #1 - Jan 5th, 2006, 11:25am
 
[quote author=scotspark  link=1136459954/0#0 date=1136459954]what are the red crosses on the Right hand side of the diy and public forums??????????????????????? [/quote]


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

??? ??? ???
Back to top
 
Thank User For This Post View members image gallery  
IP Logged
 
Lurch
Re: red crosses
Reply #2 - Jan 5th, 2006, 11:59am
 
Should this not be in 'The Forum' section?
Back to top
 
Thank User For This Post  
IP Logged
 
billythekid
Trade Member
*****
Offline

I love YaBB 1G - SP1!

Posts: 3402


Total Thanks: 0
For This Post: 0



Trade: Plumber

Re: red crosses
Reply #3 - Jan 5th, 2006, 7:47pm
 
Lec cant work out a simple IF statement Wink Wink, its eventually gonna allow you to toggle the new picture thingies display on/off.

btk(asked Lectrician for details!)
Back to top
« Last Edit: Jan 5th, 2006, 7:48pm by billythekid »  
Thank User For This Post  
IP Logged
 
billythekid
Trade Member
*****
Offline

I love YaBB 1G - SP1!

Posts: 3402


Total Thanks: 0
For This Post: 0



Trade: Plumber

Re: red crosses
Reply #4 - Jan 5th, 2006, 7:48pm
 
and consider it done Lurch... lol



btk
Back to top
 
Thank User For This Post  
IP Logged
 
Lectrician
Administrator
Trade Member
Author
*****
Offline

Ask The Trades
Posts: 8814


Total Thanks: 109
For This Post: 0


Braunton, North Devon, United Kingdom
Braunton, North Devon
United Kingdom

Gender: male

Trade: Electrician



Re: red crosses
Reply #5 - Jan 5th, 2006, 8:19pm
 
Lectrician has mastered the if, or and ands Wink

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!
Back to top
 

Need to post a picture? Click HERE for info!
Thank User For This Post WWW View members image gallery  
IP Logged
 
Lectrician
Administrator
Trade Member
Author
*****
Offline

Ask The Trades
Posts: 8814


Total Thanks: 109
For This Post: 0


Braunton, North Devon, United Kingdom
Braunton, North Devon
United Kingdom

Gender: male

Trade: Electrician



Re: red crosses
Reply #6 - 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;
Back to top
« Last Edit: Jan 5th, 2006, 8:24pm by Lectrician »  

Need to post a picture? Click HERE for info!
Thank User For This Post WWW View members image gallery  
IP Logged
 
billythekid
Trade Member
*****
Offline

I love YaBB 1G - SP1!

Posts: 3402


Total Thanks: 0
For This Post: 0



Trade: Plumber

Re: red crosses
Reply #7 - 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.)

Wink

btk
Back to top
« Last Edit: Jan 5th, 2006, 8:29pm by billythekid »  
Thank User For This Post  
IP Logged
 
hammy
Trade Member
*****
Offline

Deep joy
Posts: 3063


Total Thanks: 8
For This Post: 0


Gender: male

Trade: Decorator



Re: red crosses
Reply #8 - Jan 5th, 2006, 8:30pm
 
I need a paracetamol.    ???
Back to top
 

Deep joy
Thank User For This Post  
IP Logged
 
Lectrician
Administrator
Trade Member
Author
*****
Offline

Ask The Trades
Posts: 8814


Total Thanks: 109
For This Post: 0


Braunton, North Devon, United Kingdom
Braunton, North Devon
United Kingdom

Gender: male

Trade: Electrician



Re: red crosses
Reply #9 - Jan 5th, 2006, 8:34pm
 
[quote author=billythekid  link=1136490510/0#7 date=1136492830]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.)

Wink

btk [/quote]


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......

Wink
Back to top
 

Need to post a picture? Click HERE for info!
Thank User For This Post WWW View members image gallery  
IP Logged
 
Lectrician
Administrator
Trade Member
Author
*****
Offline

Ask The Trades
Posts: 8814


Total Thanks: 109
For This Post: 0


Braunton, North Devon, United Kingdom
Braunton, North Devon
United Kingdom

Gender: male

Trade: Electrician



Re: red crosses
Reply #10 - 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........
Back to top
 

Need to post a picture? Click HERE for info!
Thank User For This Post WWW View members image gallery  
IP Logged
 
billythekid
Trade Member
*****
Offline

I love YaBB 1G - SP1!

Posts: 3402


Total Thanks: 0
For This Post: 0



Trade: Plumber

Re: red crosses
Reply #11 - Jan 5th, 2006, 8:43pm
 
"put #it# in #quotes#"


btk
Back to top
 
Thank User For This Post  
IP Logged
 
billythekid
Trade Member
*****
Offline

I love YaBB 1G - SP1!

Posts: 3402


Total Thanks: 0
For This Post: 0



Trade: Plumber

Re: red crosses
Reply #12 - 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
Back to top
 
Thank User For This Post  
IP Logged
 
Lectrician
Administrator
Trade Member
Author
*****
Offline

Ask The Trades
Posts: 8814


Total Thanks: 109
For This Post: 0


Braunton, North Devon, United Kingdom
Braunton, North Devon
United Kingdom

Gender: male

Trade: Electrician



Re: red crosses
Reply #13 - 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!
Back to top
 

Need to post a picture? Click HERE for info!
Thank User For This Post WWW View members image gallery  
IP Logged
 
billythekid
Trade Member
*****
Offline

I love YaBB 1G - SP1!

Posts: 3402


Total Thanks: 0
For This Post: 0



Trade: Plumber

Re: red crosses
Reply #14 - Jan 5th, 2006, 8:51pm
 
Sorry Hammy  Cheesy

btk
Back to top
 
Thank User For This Post  
IP Logged
 
LSpark
Global Moderator
Trade Member
Author
*****
Offline


Posts: 8069


Total Thanks: 3
For This Post: 0


London, UK, United Kingdom
London, UK
United Kingdom

Gender: male

Trade: Electrician



Re: red crosses
Reply #15 - Jan 5th, 2006, 8:54pm
 
[quote author=Lectrician  link=1136490510/0#6 date=1136492518]Turn the images on and off at your own pleasure! [/quote]
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.

Lips Sealed
Back to top
 
Thank User For This Post View members image gallery  
IP Logged
 
Lurch
Re: red crosses
Reply #16 - Jan 5th, 2006, 8:59pm
 
*cough* dodgy software *cough*

Wink Grin
Back to top
 
Thank User For This Post  
IP Logged
 
Pages: 1 2 3 
Send Topic Print