Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Sub IncludeFile / IncludeCoin (Read 2110 times)
ChiMoHe
Full Member
***
Offline


I love YaBB 2.2

Posts: 211
Joined: Apr 4th, 2007
Sub IncludeFile / IncludeCoin
Jun 9th, 2020 at 4:27pm
Print Post  
# One should never criticize his own work except in a fresh and hopeful mood. # The self-criticism of a tired mind is suicide. # - Charles Horton Cooley

IncludeFile (incomplete missing template code)
Code
Select All
sub IncludeFile { 	my $fname = shift; 	my $file; 	$fname =~ s/([\&;\`'\|\"*\?\~\^\(\)\[\]\{\}\$\n\r])//g; 	fopen(INCLUDE, $fname) || return '[an error occured while processing this directive]'; †#' 	$file = join('', <INCLUDE>); 	fclose(INCLUDE); 	return $file; }
 



IncludeCoin uses same perl "routing" as includefile on Bitcoin server

Subs.pl
Code
Select All
sub IncludeCoin { my $fname = shift; my $file; $ETH; $BTC; $XB; $LTC; $NMC; $PPC; $XDG; $GRC; $XPM; $XPR; $NXT; $ARU; $DASH; $MZC; $NEO; $XMR; $XEM; $POT; $TIT; $XVC; $XLM; $EUR; $ATS; $BEF; $DEM; $ESP; $FIM; $FRF; $GRD; $IEP; $ITL; $LUF; $NLG; $PTE; $CYP; $MTL; $SIT; $AUD; $CHF; $HKD; $JPY; $USD; $fname =~ s/([\&;\`'\|\"*\?\~\^\(\)\[\]\{\}\$\n\r])//g; fopen(INCLUDE, $fname) || return '[an error occured while processing this directive]';† #' $file = join('', <INCLUDE>); fclose(INCLUDE); return $file; }

 


Template.pl
Code
Select All
## old tag template style decoding ##

 $output =~ s~<includecoin\s+(\w+)>~${"yy$1"}~g;

## new tag template style decoding ##

$output =~ s~{includecoin\s+(\w+)}~${"yy$1"}~g;

$output =~ s~<includecoin="(\S+)">~${\(IncludeCoin($1))}

$output =~ s~(a href\=\S+?action\=viewprofile\;username\;incudecoin\=.+?)(\>)~$1 rel=\"nofollow\"$2~isg;

 



Better coders have done more with less
« Last Edit: Jun 10th, 2020 at 1:35pm by ChiMoHe »  
Back to top
YouTube  
IP Logged
 
ChiMoHe
Full Member
***
Offline


I love YaBB 2.2

Posts: 211
Joined: Apr 4th, 2007
Re: Sub IncludeFile / IncludeCoin
Reply #1 - Nov 6th, 2020 at 2:21am
Print Post  
Template.pl for includeFile

Code
Select All
## old tag template style decoding ##

$output =~ s~<IncludeFile\s+(\w+)>~${"yy$1"}~g;

## new tag template style decoding ##

$output =~ s~{\s+(\w+)}~${"yy$1"}~g;

$output =~ s~<IncludeFile="(\S+)">~${\(IncludeFile($1))}

$output =~ s~(a href\=\S+?action\=viewprofile\username\IncludeFile\=.+?)(\>)~$1 rel=\"nofollow\"$2~isg;

 



Template.pl for IncludeCoin should be
Code
Select All
## old tag template style decoding ##

 $output =~ s~<IncludeCoin\s+(\w+)>~${"yy$1"}~g;

## new tag template style decoding ##

$output =~ s~{IncludeCoin\s+(\w+)}~${"yy$1"}~g;

$output =~ s~<IncludeCoin="(\S+)">~${\(IncludeCoin($1))}

$output =~ s~(a href\=\S+?action\=viewprofile\username\IncludeCoin\=.+?)(\>)~$1 rel=\"nofollow\"$2~isg;

 


  
Back to top
YouTube  
IP Logged
 
ChiMoHe
Full Member
***
Offline


I love YaBB 2.2

Posts: 211
Joined: Apr 4th, 2007
Re: Sub IncludeFile / IncludeCoin
Reply #2 - Nov 6th, 2020 at 2:30am
Print Post  
IncludeCoin mod is depending on using Extended profiles mod

Create an extended profile field with each cryptocurrency and fiat currency tokens listed in IncludeCoin subs.pl
  
Back to top
YouTube  
IP Logged
 
ChiMoHe
Full Member
***
Offline


I love YaBB 2.2

Posts: 211
Joined: Apr 4th, 2007
Re: Sub IncludeFile / IncludeCoin
Reply #3 - Nov 6th, 2020 at 2:40am
Print Post  
Subs.pl doesnít matter where you put it in so much

Template.pl should be wherever you want it inside of profiles section

I donít currently have a computer and Iím doing this with an iPhone so I canít bata test it
  
Back to top
YouTube  
IP Logged
 
ChiMoHe
Full Member
***
Offline


I love YaBB 2.2

Posts: 211
Joined: Apr 4th, 2007
Re: Sub IncludeFile / IncludeCoin
Reply #4 - Nov 6th, 2020 at 2:54am
Print Post  
With the polls the auction mod Installed create a PayPal integrated cryptocurrency and currency auction site
installed create a PayPal integrated cryptocurrency and currency auction site

http://www.boardmod.org/cgi-bin/forum/YaBB.pl?num=1149281807
  
Back to top
YouTube  
IP Logged
 
ChiMoHe
Full Member
***
Offline


I love YaBB 2.2

Posts: 211
Joined: Apr 4th, 2007
Re: Sub IncludeFile / IncludeCoin
Reply #5 - Nov 7th, 2020 at 11:01am
Print Post  
Missing profile PL link
  
Back to top
YouTube  
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint