![]() |
![]() |
![]() |
||||
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
I help you SUCCEED
Industry Role:
Join Date: Nov 2003
Location: The Pearl of the Orient Seas
Posts: 32,195
|
Anyone know of a PHP script that does this?
You put it on your Forum signature (VB) and it randomly pulls titles from your blog. it is clickable.
Thanks in advance |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
Too lazy to set a custom title
Join Date: Jun 2006
Posts: 19,047
|
the forum needs to allow links that generate dynamically code (i wouldn't).
With a picture (.jpg for example) and an url rewrite you can call a picture and you can generate it dynamically, but nothing more. If the forum allows swf sig, it is possible |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 |
Confirmed User
Industry Role:
Join Date: May 2002
Location: Toronto, Canada
Posts: 5,599
|
Create a script that generates an image and sets a cookie on the surfer's computer. Have that image linked to another script that will read the cookie to figure out what post it is and send the surfer to the blog post. It's not exactly what you were looking for but it'll work.
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 | |
Too lazy to set a custom title
Join Date: Jun 2006
Posts: 19,047
|
Quote:
But one link per picture |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 | |
see you later, I'm gone
Industry Role:
Join Date: Oct 2002
Posts: 14,073
|
Quote:
.
__________________
All cookies cleared! |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#6 |
I help you SUCCEED
Industry Role:
Join Date: Nov 2003
Location: The Pearl of the Orient Seas
Posts: 32,195
|
The mainstream wm forum dp has this feature but it does not RANDOMLY pull posts from your blog
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#7 | |
see you later, I'm gone
Industry Role:
Join Date: Oct 2002
Posts: 14,073
|
Quote:
I think Smokey might have some similar stuff. I know he was messing with the same technique about the same time I was playing with it a lot. .
__________________
All cookies cleared! |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#8 |
Confirmed User
Industry Role:
Join Date: Dec 2004
Location: Denver
Posts: 6,559
|
Doesn't really matter where it pulls them from. You just need to write a small secondary script to create a similar file/database to the one it currently pulls from, and then have the script pull from that new file/database.
__________________
![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#9 |
see you later, I'm gone
Industry Role:
Join Date: Oct 2002
Posts: 14,073
|
Mine is now pulling from one of my blogs. Took about 10 minutes to switch around, mostly turning off code ;p
I will make it clickable/trackable later on or tomorrow. .
__________________
All cookies cleared! |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#10 | |
see you later, I'm gone
Industry Role:
Join Date: Oct 2002
Posts: 14,073
|
Quote:
I looked at registering third party cookies a while back. Looked like a pain in the ass to me so I didn't go that route. Easiest way is just to send them to whichever one was the last one you displayed. It is not a00% accurate but a hell of a lot easier ;p btw, the sig is cliskable now. .
__________________
All cookies cleared! |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#11 |
see you later, I'm gone
Industry Role:
Join Date: Oct 2002
Posts: 14,073
|
Just reading back through this and I find I need to apologize for all my typos, I am actually literate to a certain extent. lol.
Typing fast on my laptop kb does not work well. .
__________________
All cookies cleared! |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#12 |
I help you SUCCEED
Industry Role:
Join Date: Nov 2003
Location: The Pearl of the Orient Seas
Posts: 32,195
|
Sarettah
I need text, not an image. Nice script by the way |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#13 | |
see you later, I'm gone
Industry Role:
Join Date: Oct 2002
Posts: 14,073
|
Quote:
No way that I have ever figured out to inject text into a page from outside. As far as I have been able to figure, from outside the forum the best you can do is a clickable image. Now, if it is your own forum it would be extremely simple to hard code a routine in if there isn't a plugin to handle it already, .
__________________
All cookies cleared! |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#14 |
. . .
Industry Role:
Join Date: Apr 2007
Location: NY
Posts: 13,724
|
I'm thinking that there is a way you could fudge this together using imagemagick
![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#15 | |
see you later, I'm gone
Industry Role:
Join Date: Oct 2002
Posts: 14,073
|
Quote:
The sig is now keeping track by ip and refer string of what image was last seen and then grabbing the associated url for the redirect. Won't be perfect because of dynamic ip schemes and proxies but it should be pretty close ;p .
__________________
All cookies cleared! |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#16 |
I help you SUCCEED
Industry Role:
Join Date: Nov 2003
Location: The Pearl of the Orient Seas
Posts: 32,195
|
Sarettah, does your script handle different FONTs and COLORs?
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#17 |
Too lazy to set a custom title
Join Date: Jun 2006
Posts: 19,047
|
i learn stuff everyday
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#18 |
Affiliate
Industry Role:
Join Date: Oct 2002
Location: Icq: 94-399-723
Posts: 24,433
|
nice sig sarettah
now give up the code please ![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#19 |
see you later, I'm gone
Industry Role:
Join Date: Oct 2002
Posts: 14,073
|
Thanx.
lol. Considering it. It is a project (have actual domains for it and everything) that I started on 5 years ago and then shelved with the full intent of getting back to it. It was not shelved for lack of interest but rather because of lack of income. I could finish it and maybe have something to sell and maybe make enough money or I could do outside contracting and definitely make enough money. I chose the sure thing. But ya know how that goes. So, right now (last night I spent an hour or so reviewing my code) I do NOT have a fully functioning user control panel for it yet. I have a 75% one but that doesn't really help much. I also have the blog pull just slammed in there, that would need to be dynamic so you could point it at various blogs etc. To the question can I do different fonts, colors? yep. You can control the foreground color, background color. I do not have it set up to use multiple foreground colors but that is possible I believe. The fonts are pulled from a font folder on my server. I loaded it up with a bunch of fonts that someone was passing around back then. A zip full of free/public domain (supposedly) fonts, mainly ttf. I say supposedly because there are tons of what are supposed to be free fonts out there that when you check them they are not actullay free. Since I support copyrights I would not distribute the fonts I have with the code. But since the program reads the fonts directory for the selection it offers up you just need to go find your own set of ttf fonts. Reading back on that, god I suck at typing and I don't even have my laptop keyboard to blame this time. So, sorry again for the typos but I ain't going back and fixing them this time. ;p .
__________________
All cookies cleared! |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#20 |
see you later, I'm gone
Industry Role:
Join Date: Oct 2002
Posts: 14,073
|
Ok, you need a folder for the make sigs script. This folder has htaccess that redirects any .jpg or .gif call to the make sigs program.
So htaccess looks something like this: AuthUserFile /dev/null AuthGroupFile /dev/null RewriteEngine On ReWriteRule .*\.(jpg|gif)$ http://www.domain_installed_on/sigs/make_sig.php [R,L] Then I have a config file for the hook ups to the database and some other stuff: <?php function hookitup() { // full server path to ttf font library $font_path='/home/xxxxxxxx/ttffonts/'; // font name to use for sig $font_name='Loungy.ttf'; //font size to use for sig $font_size='18'; // name of blog being pulled from $blog_name='yourblogname.com'; // put mysql credentials necessary for your main database here $main_host='xxxxxxxx'; $main_user='xxxxxxx'; $main_pass='xxxxxx'; $main_dbname='xxxxxxx'; // put mysql credentials necessary for your blog database here $blog_host='xxxxxxxxx'; $blog_user='xxxxxxxx'; $blog_pass='xxxxxxxxxx'; $blog_dbname='xxxxxxxxx'; $maindb = mysql_pconnect($main_host,$main_user,$main_pass); if(!$maindb) { die("could not hook up to the main database"); } if($main_host==$blog_host && $main_user==$blog_user && $main_pass==$blog_pass) { // if all data is in one db then use the same connection $blogdb=$maindb; } else { // if data is in different dbs then we need 2 connections $blogdb = mysql_pconnect($blog_host,$blog_user,$blog_pass); if(!$blogdb) { die("could not hook up to the blog database"); } } $returnit=array( "maindb"=>$maindb, "blogdb"=>$blogdb, "main_dbname"=>$main_dbname, "blog_dbname"=>$blog_dbname, "font_path"=>$font_path, "font_name"=>$font_name, "font_size"=>$font_size, "blog_name"=>$blog_name ); return $returnit; } ?> Then there is the make_sigs script (please not that I have some hardcodes in there for gfy, these were dynamic but I hardcoded the changes I made a few days ago for the blog pull in and demo and I have not gotten back to changing it up: <?php error_reporting(0); $ip2use=$_SERVER['REMOTE_ADDR']; if(!isset($_SERVER['HTTP_REFERER'])) { $refer2use=''; } else { $refer2use=mysql_real_escape_string($_SERVER['HTTP_REFERER']); } require_once('../sig_config.php'); $dblist=hookitup(); $maindb=$dblist['maindb']; $blogdb=$dblist['blogdb']; $maindbname=$dblist['main_dbname']; $blogdbname=$dblist['blog_dbname']; $fontpath=$dblist['font_path']; $fontname=$fontpath . $dblist['font_name']; $fontsize=$dblist['font_size']; $blogname=$dblist['blog_name']; // This assumes the blog is WP and the posts table is wp_posts $sql_str="select id, post_title from " . $blogdbname . ".wp_posts order by rand() limit 1 "; $result = mysql_query($sql_str,$blogdb); //echo "result=" . $result . "<br>"; $blog=mysql_fetch_array($result); $id2use=$blog['id']; // mod to handle blogs. Not bringing in multi lines from blog database $numlines=1; $lines=array(); $sql_str="select * from " . $maindbname . ".sig_track where "; $sql_str .="ip='" . $ip2use . "' "; $sql_str .="and refer='" . $refer2use . "' "; $result=mysql_query($sql_str,$maindb); //echo "sql=" . $sql_str . "<br>"; //echo "result - pull from sig_track=" . $result . "<br>"; if($result) { if(mysql_num_rows($result)>0) { $sql_str="update " . $maindbname . ".sig_track set currid='" . $id2use . "' where "; $sql_str .="ip='" . $ip2use . "' "; $sql_str .="and refer='" . $refer2use . "' "; $result=mysql_query($sql_str,$maindb); //echo "result - update sig_track=" . $result . "<br>"; } else { $sql_str="insert into " . $maindbname . ".sig_track(ip, refer, currid) values("; $sql_str .="'" . $ip2use . "', "; $sql_str .="'" . $refer2use . "',"; $sql_str .="'" . $id2use . "')"; $result=mysql_query($sql_str,$maindb); //echo "result - insert into sig_track=" . $result . "<br>"; } } $sql_str="update " . $maindbname . ".currentid set currid='" . $id2use . "'"; $result = mysql_query($sql_str,$maindb); $line2use=$blogname . ' - ' . $blog['post_title']; $lines[1]=$line2use; $lines2use=1; $imwidth=0; $imheight=0; // should be reading this in from table for gfy make 900 $width2use=900; // hardcode for gfy $maxwidth=900; //$maxwidth=0; $maxheight=0; $outstr=''; $linechk=imagettfbbox($fontsize,0,$fontname, 'test'); $height2use=($linechk[1] - $linechk[7]) + 5; for($linecnt=1;$linecnt<=$numlines;$linecnt++) { $workstr=$lines[$linecnt]; if (strlen($lines[$linecnt])>0) { $linechk=imagettfbbox($fontsize,0,$fontname, $lines[$linecnt]); $currwidth=$linechk[2] - $linechk[0]; $parts=0; $breakit=0; $breaklen=0; $holdstr=''; if($currwidth>$width2use and strlen($workstr)>0) { $parts=intval($currwidth/$width2use); if (($currwidth/$width2use-$parts)>0) { $parts=$parts + 1; } } if($parts>0) { $holdstr=''; $lines2use=$parts; $breakit=$parts; $chklen=strlen($workstr); while($breakit>0) { $linechk=imagettfbbox($fontsize,0,$fontname, $workstr); $breaklen=$linechk[2] - $linechk[0]; if($breaklen>$width2use) { while($breaklen>$width2use) { $chklen=$chklen-1; $strtochk=substr($workstr,0,$chklen); $linechk=imagettfbbox($fontsize,0,$fontname, $strtochk); $breaklen=$linechk[2] - $linechk[0]; } $currwidth=$breaklen; $newlen=intval($chklen); $testchar=substr($workstr,$newlen,1); if($testchar<>' ') { while($testchar<>' ') { $newlen=$newlen-1; $testchar=substr($workstr,$newlen,1); } } $holdstr=$holdstr . substr($workstr,0,$newlen); $workstr=trim(substr($workstr,$newlen)); $holdstr=$holdstr . chr(13) . chr(10); $lines2use=$lines2use + 1; $breakit=$breakit-1; } else { $breakit=$breakit-1; } } $workstr=$holdstr . $workstr; $maxheight=$maxheight + ($lines2use * $height2use); } else { $lines2use=$lines2use+1; $maxheight=$maxheight + $height2use + 5; } if($currwidth>$maxwidth) { $maxwidth=$currwidth; } } else { $lines2use=$lines2use+1; $maxheight=$maxheight + $height2use + 5; } $outstr=$outstr . $workstr . chr(13) . chr(10); } //$maxwidth=$maxwidth+25; header ("Content-type: image/gif"); $im = imagecreate ($maxwidth, $maxheight); // hardcoded colors for gfy $background = imagecolorallocate ($im, 51, 51, 51); $foreground = imagecolorallocate ($im, 255, 255, 255); imagettftext ($im, $fontsize, 0, 5, 20, $foreground, $fontname, $outstr); imagegif ($im); imagedestroy ($im); ?> Database tables I am using: -- -- Table structure for table `currentid` -- CREATE TABLE IF NOT EXISTS `currentid` ( `currid` char(20) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Table structure for table `sig_track` -- CREATE TABLE IF NOT EXISTS `sig_track` ( `id` int(11) NOT NULL AUTO_INCREMENT, `ip` char(15) NOT NULL, `refer` varchar(254) NOT NULL, `currid` char(10) NOT NULL, PRIMARY KEY (`id`), KEY `ip` (`ip`,`refer`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1102 ; I think that does it. Enjoy ![]() .
__________________
All cookies cleared! |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#21 |
Registered User
Join Date: Dec 2006
Posts: 64
|
sarettah
![]() ![]() ![]() ![]() not going to use it... but your action deserves some ![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#22 | |
see you later, I'm gone
Industry Role:
Join Date: Oct 2002
Posts: 14,073
|
Quote:
![]() j/k, thanx .
__________________
All cookies cleared! |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#23 |
see you later, I'm gone
Industry Role:
Join Date: Oct 2002
Posts: 14,073
|
Fuck, I just realized that there is one more piece that I di not put up there.
The clicksig piece is the piece that handles when the sig is clicked on and redirects it to the right url for the image they are on. The clicksig piece: <?php $id2use=''; $url2use=''; $ip2use=$_SERVER['REMOTE_ADDR']; if(!isset($_SERVER['HTTP_REFERER'])) { $refer2use=''; } else { $refer2use=mysql_real_escape_string($_SERVER['HTTP_REFERER']); } require_once('sig_config.php'); $dblist=hookitup(); $maindb=$dblist['maindb']; $maindbname=$dblist['main_dbname']; $sql_str="select * from " . $maindbname . ".sig_track where "; $sql_str .="ip='" . $ip2use . "' "; $sql_str .="and refer='" . $refer2use . "' "; $result=mysql_query($sql_str,$maindb); if($result) { if(mysql_num_rows($result)>0) { $work=mysql_fetch_array($result); $id2use=$work['currid']; } else { $sql_str="select currid from " . $maindbname . ".currentid"; $result = mysql_query($sql_str,$db); if($result) { $idrow=mysql_fetch_array($result); $id2use=$idrow['currid']; } } } if(!empty($id2use)) { $url2use="http://your_base_wp_singlepost_url_here/p=" . $id2use; } else { $url2use="http://your_default_url_here"; } Header("Location: " . $url2use); ?>
__________________
All cookies cleared! |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#24 |
see you later, I'm gone
Industry Role:
Join Date: Oct 2002
Posts: 14,073
|
To put it together where you want to use it.
href or url tag = your_domain_url.com/clicksig.php img src or img tag = your_domain_url.com/sigs/any_old_name_will_do.jpg
__________________
All cookies cleared! |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#25 |
58008 53773
Industry Role:
Join Date: Jul 2005
Location: Australia
Posts: 9,864
|
You realise that op is going to use this to spam links and sell as a "service" to people?
__________________
TripleXPrint on Megan Fox "I would STILL suck her pussy until her face caved in. And then blow her up and do it again!" |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#26 |
<&(©¿©)&>
Industry Role:
Join Date: Jul 2002
Location: Chicago
Posts: 47,882
|
you just need the script login to the board, and change the sig... not exactly rocket science...
![]() If you are looking to invest a few bucks for this technology, hit me up, icq: 3337524
__________________
Custom Software Development, email: woj#at#wojfun#.#com to discuss details or skype: wojl2000 or gchat: wojfun or telegram: wojl2000 Affiliate program tools: Hosted Galleries Manager Banner Manager Video Manager ![]() Wordpress Affiliate Plugin Pic/Movie of the Day Fansign Generator Zip Manager |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#27 | |
Confirmed User
Join Date: Oct 2002
Posts: 3,745
|
Quote:
__________________
For historical display only. This information is not current: support@bettercgi.com ICQ 7208627 Strongbox - The next generation in site security Throttlebox - The next generation in bandwidth control Clonebox - Backup and disaster recovery on steroids |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#28 |
I help you SUCCEED
Industry Role:
Join Date: Nov 2003
Location: The Pearl of the Orient Seas
Posts: 32,195
|
Thanks, Sarettah
|
![]() |
![]() ![]() ![]() ![]() ![]() |