To use this website completely, it is necessary to store cookies on your computer.
 

Move PortaMx copyright to the right side of SMF copyright

Started by feline, 2009 August 12, 22:55:00

previous topic - next topic

0 Members and 0 Guests are viewing this topic.

feline

2009 August 12, 22:55:00
Here comes a small hack, to move the PortaMx copyright.
After apply the patch it looks as:
Powered by SMF 2.0 RC1.2 | SMF © 2006-2009, Simple Machines LLC | Extended by PortaMx v0.961 | PortaMx © 2008-2009, PortaMx corp.

Open Sources/QueryString.php, go to line 505
Find:
Code Select

function ob_sessrewrite($buffer)
{
global $scripturl, $modSettings, $user_info, $context;


Add AFTER:
Code Select


//-> start add PortaMx
$args = unserialize(base64_decode('YTo3OntpOjA7czoyNToiPHNwYW4gaWQ9InBteF9jb3B5d3JpdGUiPiI7aToxO3M6MjU6IiwgU2ltcGxlIE1hY2hpbmVzIExMQzwvYT4iO2k6MjtzOjE5OiIgaWQ9InBteF9jb3B5d3JpdGUiIjtpOjM7czoyNzoiUG9ydGFsIE1hbmFnZW1lbnQgRXh0ZW5zaW9uIjtpOjQ7czoxMjoiRXh0ZW5kZWQgYnkgIjtpOjU7czoxNzoiIGJ5IFBvcnRhTXggY29ycC4iO2k6NjtzOjE1OiIsIFBvcnRhTXggY29ycC4iO30='));
if(preg_match('~'. $args[0] .'.*</span>~', $buffer, $match) == 1 && preg_match('~'. $args[1] .'~', $buffer, $tmp) == 1)
{
$match[0] = str_replace($args[2], '', str_replace($args[3], $args[4], str_replace($args[5], $args[6], $match[0])));
$buffer = preg_replace('~<div>'. $args[0] .'.*</div>~', '', $buffer);
$buffer = preg_replace('~'. $tmp[0] .'~', $tmp[0] .' | '. $match[0], $buffer);
}
unset($args);
//-> end add PortaMx


That's all ..  8)

Happy patching

Fel
Many are stubborn in relation to the path, a few in relation to the target.

antechinus

#1
2009 August 12, 23:06:50
Cool trick.
Using Internet Explorer 6 on the internet is like urinating in a public swimming pool.
It's rude, there's no excuse for it, and anyone who does it should be ashamed of themselves.

hayseed

#2
2009 August 13, 01:47:47
Very neat Fel. Will this be included in the next PortaMx release? Or will it remain a patch? :)

Cool

#3
2009 August 13, 10:08:46
this looks nice! and i like base64 encoding for this purpose.

is there any big diff. between the base64_decode and clean html output to server recources?(must be at least the time for decoding it)
 |I Use: SMF 2.0.5 | PortaMx 1.51
Q: What do you do when you see a bear in the woods?
A: Play Dead!
H-A-H-L = Happy Admins Have Linux

feline

#4
2009 August 13, 13:08:45
The runtime for the complete moving procedure is aprox 25 milliseconds ... and I can't measure a difference with or without b64 decode.

For the next update this moving you can enable in the settings and I put the $arg stream to the database, so it's not need to load this in the moving service.

For now it's only a small hack  ;)

Fel
Many are stubborn in relation to the path, a few in relation to the target.

feline

#5
2009 August 13, 13:11:21
Quote from: hayseed ,  2009 August 13, 01:47:47
Very neat Fel. Will this be included in the next PortaMx release? Or will it remain a patch? :)

Yes, coming with the next update. I will look, if I can make that theme depended...

Fel
Many are stubborn in relation to the path, a few in relation to the target.

hayseed

#6
2009 August 14, 01:56:43
Quote from: feline ,  2009 August 13, 13:11:21
Yes, coming with the next update. I will look, if I can make that theme depended...

Fel


Fantastic. Thanks for all your work! :D

antechinus

#7
2009 August 14, 08:05:34
How about an option to do it like this?

Powered by SMF 2.0 RC1.2 | SMF © 2006-2009, Simple Machines LLC
Extended by PortaMx v0.961 | PortaMx © 2008-2009, PortaMx corp.   
Using Internet Explorer 6 on the internet is like urinating in a public swimming pool.
It's rude, there's no excuse for it, and anyone who does it should be ashamed of themselves.

hayseed

#8
2009 August 14, 08:52:40
Quote from: antechinus ,  2009 August 14, 08:05:34
How about an option to do it like this?

Powered by SMF 2.0 RC1.2 | SMF © 2006-2009, Simple Machines LLC
Extended by PortaMx v0.961 | PortaMx © 2008-2009, PortaMx corp.   


I also like that option too (and after some thought, prefer it.) Will help the line from getting too long and wrapping funny on some templates.

Cool

#9
2009 August 14, 09:29:57
may shorten it to:
Extended by PortaMx v0.961 | © 2008-2009, PortaMx corp.
 |I Use: SMF 2.0.5 | PortaMx 1.51
Q: What do you do when you see a bear in the woods?
A: Play Dead!
H-A-H-L = Happy Admins Have Linux

feline

#10
2009 August 14, 20:24:34
Quote from: antechinus ,  2009 August 14, 08:05:34
How about an option to do it like this?

Powered by SMF 2.0 RC1.2 | SMF © 2006-2009, Simple Machines LLC
Extended by PortaMx v0.961 | PortaMx © 2008-2009, PortaMx corp.   

That not works with the most themes, because the footer in not hight enough for all the infos in it ...
Many are stubborn in relation to the path, a few in relation to the target.

feline

#11
2009 August 14, 20:26:43
Quote from: Cool ,  2009 August 14, 09:29:57
may shorten it to:
Extended by PortaMx v0.961 | © 2008-2009, PortaMx corp.

No, that is not a legal copyright .. the (C) is not the PortaMx corp.
PortaMx is a (C) of the PortaMx corp.
Same as SFM....

Fel
Many are stubborn in relation to the path, a few in relation to the target.

antechinus

#12
2009 August 15, 00:47:26
Quote from: feline ,  2009 August 14, 20:24:34
Quote from: antechinus ,  2009 August 14, 08:05:34
How about an option to do it like this?

Powered by SMF 2.0 RC1.2 | SMF © 2006-2009, Simple Machines LLC
Extended by PortaMx v0.961 | PortaMx © 2008-2009, PortaMx corp.   

That not works with the most themes, because the footer in not hight enough for all the infos in it ...

Don't worry. I think I am capable of editing the height of a footer. ;)
Using Internet Explorer 6 on the internet is like urinating in a public swimming pool.
It's rude, there's no excuse for it, and anyone who does it should be ashamed of themselves.

markre

#13
2011 August 04, 09:00:34
Works it with the current Versions of PortaMX (1.4) and SMF (2.0 Gold), too?
MfG, Mario.

Sete 1: !! N E U !! Jetzt mit eigenem Theme !! ---> SMF 2.0 | PortaMx 1.41

Seite 2: SMF 2.0 | PortaMx 1.4

feline

#14
2011 August 04, 09:18:36
I dont know what you mean.
PortaMx 1.4 have a other Copyright and it's show as all other in the footer...
Many are stubborn in relation to the path, a few in relation to the target.