vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Beta Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=5)
-   -   Popular Links Hack (https://vborg.vbsupport.ru/showthread.php?t=48241)

maestrosdelweb 01-27-2003 10:00 PM

Popular Links Hack
 
This hack will save the urls posted in the messages of your forum and count the visits to each url. Then you'll be able to list the popular Urls of your forum in a separate page.

Hack Facts:
New DB Table: 1
New Files: 2
File Modifications: 1
New Templates: 2
Template Modifications: 1

Download the .zip and follow the Install.txt file.

Any comment will be apreciated.

maestrosdelweb 01-28-2003 06:52 AM

The live demo can be accesed in:
http://www.forosdelweb.com/links_out.php

Enjoy it..

And by the way this is my first hack.

I hope its useful.

Davey 01-28-2003 07:55 AM

Cool man, this hack looks sweet!
Thanks!! :).
Keep up the good work.

Dave.

PS: /me installs ;).

Automated 01-28-2003 09:15 AM

A very interesting hack :p

Davey 01-28-2003 09:19 AM

Ah found a bug :P.
It uses http://www.yoururl.com/out.php?http://www.otherurl.com
It interprets it as a url, and doesn't redirect to http://www.otherurl.com.
Can you fix it?

Dave.

Davey 01-28-2003 12:43 PM

Nevermind it seems too buggy for me.
I'm on the brink of releasing my script and I need urls to function correctly, seeing as my attachments don't.
[high]* Davey uninstalls.
[/high]
Sorry.
Maybe another time :).

Dave.

maestrosdelweb 01-28-2003 01:10 PM

Davey. If I can help you somhow to make it work let me know. Your error is weird.

Slynderdale 01-28-2003 02:50 PM

You should url encode the right url before you output it or youll get errors with urls.

Slynderdale 01-28-2003 02:56 PM

hmm, see if this works:

find:
PHP Code:

  $hyperlink iif(trim($hyperlink)=="" or $hyperlink==$urliif(strlen($url)>55,substr($url,0,35)."...".substr($url,-15),$url) ,$hyperlink);
  return 
"<a href=\"/out.php?$righturl\" target=\"_blank\">".str_replace('\"''"'$hyperlink)."</a>";


above it add:
PHP Code:

$righturl htmlentities(urlencode($righturl)); 

in out.php find:
PHP Code:

$UrlAdr $_SERVER['QUERY_STRING']; 

under it add:
PHP Code:

$UrlAdr urldecode($UrlAdr); 


tell me if that works.

Dean C 01-28-2003 03:48 PM

Looks like a very nice hack - i might just convert this to suit my needs :)

Thanks

- miSt

maestrosdelweb 01-28-2003 06:05 PM

Thanks to Slynderdale for the update to fix that bug

I'll add that to the .zip file.

msu 01-28-2003 08:57 PM

cooooooooool hack

thanx maestrosdelweb

and keep up the good work :)

AussieSat 01-29-2003 09:44 AM

I couldn't tell if this hack uses permissions - I guess not?
Will popular links in private forums show for all users?

maestrosdelweb 01-29-2003 02:14 PM

I haven't use perrmissions.

All links in the forum are getting recorded.

What you could do is show the Most Popular links only to one group of users but that's not yet implemented.

NuclioN 01-29-2003 09:06 PM

?? when users click a link in a forum they get an error:

Warning: Cannot add header information - headers already sent by (output started etc etc

ricoche 01-31-2003 11:54 AM

Hi there,

I must admit this hack looks pretty nice.

Unfortunately I had to uninstall it because of the URL errors as stated previously above. Even with the fixed code I was still getting error pages.

I think I'll wait until this becomes more stable.

Sorry about that.

:(

Slynderdale 01-31-2003 02:48 PM

Quote:

Originally posted by ricoche
Hi there,

I must admit this hack looks pretty nice.

Unfortunately I had to uninstall it because of the URL errors as stated previously above. Even with the fixed code I was still getting error pages.

I think I'll wait until this becomes more stable.

Sorry about that.

:(


I'll look into it more later, I'm planning to add forum permission as well to it later too.

Molok 02-01-2003 04:58 PM

Quote:

Originally posted by NuclioN
?? when users click a link in a forum they get an error:

Warning: Cannot add header information - headers already sent by (output started etc etc

you must set in out php your forums url by $yourforum

maestrosdelweb 02-04-2003 04:00 PM

The changes to the code suggested by Slynderdale should fix the error.

The .zip file was updated with the changes.

fla5h 02-04-2003 05:35 PM

Great hack m8, a problem I found was that if the person posts the link in HTML, the hack is bypassed.

Yeah you can just ban html, but I thought I'd inform you, and is there a workaround ?

gmarik 06-09-2003 05:23 PM

Oh, and could you add "in" links?!

maestrosdelweb 06-09-2003 11:11 PM

Yes. Great suggestion. So users can link back to your website.. Let me work on it soon.

gmarik 06-10-2003 12:12 PM

Oh, I could send you some php sources that have this option, need the files? I could send them via e-mail to you.

Another suggestion: add a table with links and paths to images. If the link listed in link_ou.php is the one, that has an image, an additional image is shown, something like a small banner.


All times are GMT. The time now is 01:18 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01283 seconds
  • Memory Usage 1,762KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (23)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete