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)
-   -   vB Link System - integrated, categorized link directory with extras... (https://vborg.vbsupport.ru/showthread.php?t=49156)

Gryphon 02-24-2003 09:18 PM

Is there any notification when a link has been submitted?

How about an option for people to request catagories?

Thanks, great hack.

Aaron1 02-25-2003 07:42 AM

Hi after installing your latest version, i have created folders in the admin cp. but whenever i try to access that folder in the forum, i got a mysql error:
---------------------
Database error in vBulletin 2.2.7:

Invalid SQL: SELECT COUNT(*) AS count FROM link WHERE folderid='1' ORDER BY sponsor DESC, points/voters DESC, title LIMIT 0,
mysql error: You have an error in your SQL syntax near '' at line 1

mysql error number: 1064

Date: Tuesday 25th of February 2003 10:29:36 AM
Script: http://www.housequake.com/forum/foru...der&folderid=1
Referer: http://www.housequake.com/forum/links.php
---------------------

I guess the /forum/forum/ path seems wrong, but i don't know where to change that. Any clues?

Thanks!

Aaron1 02-25-2003 08:07 AM

Somehow it works now, i choose save changes in the admin cp, where it says links per page. I guess the changes weren't set in the first place?
Nevertheless it seems to work now, clicks install!

N!ck 02-26-2003 02:27 AM

i'll be sure and add the notification and category request options into one of the next couple of releases. expect 0.1.4 by the weekend; it will fix the link counts thing and perhaps at least have the notification feature

thanks for the suggestions.

Gryphon 02-27-2003 04:57 PM

Quote:

Originally posted by nicksaunders
i'll be sure and add the notification and category request options into one of the next couple of releases. expect 0.1.4 by the weekend; it will fix the link counts thing and perhaps at least have the notification feature

thanks for the suggestions.

Cant wait :D

papa 02-28-2003 02:49 PM

I have a question as to why when I submit a link it opens up the link? Is there a way to disable that feature? I'd like it to go back to links.php if possible. Also is there a clean way to make the links page show up in the index.php so it look like a forum until you go into it or do you just have to link to the page?

Gryphon 02-28-2003 05:07 PM

This hack would be nicely incorporated into this links hack.

https://vborg.vbsupport.ru/showthrea...threadid=49470

N!ck 02-28-2003 08:32 PM

papa - I will add it as an option soon. Search the template forums for information on creating a forum that is actually a link.
BlackJack - Thanks for the heads-up. I wasn't sure how I was going to accomplish the link checking.

CJi 03-01-2003 01:18 AM

I can't wait until this becomes -STABLE :)

N!ck 03-01-2003 03:13 AM

that will probably be awhile :)

Aaron1 03-02-2003 07:31 AM

Quote:

Originally posted by nicksaunders
This fixes that issue with folders not updating when links are edited or deleted.
Thanks for the update, but how in earth do i delete links?
I tried visible to invisible, but no luck sofar. Do i really need to use phpmyadmin to delete some links?

Nevertheless a very cool hack! :)
Thanks man!

Kars10 03-02-2003 07:37 AM

Quote:

Originally posted by Aaron1


Thanks for the update, but how in earth do i delete links?
I tried visible to invisible, but no luck sofar. Do i really need to use phpmyadmin to delete some links?

Nevertheless a very cool hack! :)
Thanks man!

No, you have a new checkbox (delete) in "edit links"! :)

Aaron1 03-02-2003 07:43 AM

You're right!
I never updated the admin/links.php!
Me stupid :)

N!ck 03-02-2003 07:57 PM

This nifty little addon will display "down" next to a link title if it is not working.

Credit goes to Slynderdale, he did all the hard work.

So, open links.php and find:

PHP Code:

require("./global.php"); 

Replace it with:

PHP Code:

require("./global.php");

// URL Status Checker by Slynderdale
// Integrated by Nick Saunders
function check_url($url) {
    
$status_array = array(
      
"N/A"=>"Ikke HTTP",
      
"OK"=>"Valid hostname",
      
"FEJL"=>"Invalid hostname",
      
"D?d"=>"No response",
      
"100"=>"Continue",
      
"101"=>"Switching Protocols",
      
"200"=>"OK",
      
"201"=>"Created",
      
"202"=>"Accepted",
      
"203"=>"Non-Authoritative Information",
      
"204"=>"No Content",
      
"205"=>"Reset Content",
      
"206"=>"Partial Content",
      
"300"=>"Multiple Choices",
      
"301"=>"Moved Permanently",
      
"302"=>"Found",
      
"303"=>"See Other",
      
"304"=>"Not Modified",
      
"305"=>"Use Proxy",
      
"307"=>"Temporary Redirect",
      
"400"=>"Bad Request",
      
"401"=>"Unauthorized",
      
"402"=>"Payment Required",
      
"403"=>"Forbidden",
      
"404"=>"Not Found",
      
"405"=>"Method Not Allowed",
      
"406"=>"Not Acceptable",
      
"407"=>"Proxy Authentication Required",
      
"408"=>"Request Timeout",
      
"409"=>"Conflict",
      
"410"=>"Gone",
      
"411"=>"Length Required",
      
"412"=>"Precondition Failed",
      
"413"=>"Request Entity Too Large",
      
"414"=>"Request-URI Too Long",
      
"415"=>"Unsupported Media Type",
      
"416"=>"Requested Range Not Satisfiable",
      
"417"=>"Expectation Failed",
      
"500"=>"Internal Server Error",
      
"501"=>"Not Implemented",
      
"502"=>"Bad Gateway",
      
"503"=>"Service Unavailable",
      
"504"=>"Gateway Timeout",
      
"505"=>"HTTP Version Not Supported"
    
);
    
$urlArray parse_url($url);
    if (!
$urlArray[port]) $urlArray[port] = "80";
    if (!
$urlArray[path]) $urlArray[path] = "/";
    
$sock = @fsockopen($urlArray[host], $urlArray[port], &$errnum, &$errstr10);
    if (!
$sock) {
      
$return[code] = "Dead";
    } else {
        
$dump .= "HEAD $urlArray[path] HTTP/1.1\r\n";
        
$dump .= "User-Agent: Link Checker\r\n";
        
$dump .= "Host: $urlArray[host]\r\nConnection: close\r\n";
        
$dump .= "Connection: close\r\n\r\n";
        @
fputs($sock$dump);
        while(
$str = @fgets($sock1024)) {
            if (
eregi("^http/[0-9]+.[0-9]+ ([0-9]{3}) [a-z ]*"$str)) {
              
$return[code] = trim(eregi_replace("^http/[0-9]+.[0-9]+ ([0-9]{3}) [a-z ]*""\\1"$str));
            }
            if (
eregi("^Content-Type: "$str)) $return[contentType] = trim(eregi_replace("^Content-Type: """$str));
        }
        @
fclose($sock);
        
flush();
    }
    
$return[status] = $status_array[$return[code]];
    return 
$return;
}
// End URL Status Checker 

Still in links.php, find:

PHP Code:

    $link[title]=stripslashes($link[title]);
    
$link[date]=vbdate("m-d-Y",$link[dateline]);
    
$link[time]=vbdate("h:i A",$link[dateline]); 

After this, add:
PHP Code:

    $linkstatus=check_url($link[url]);
    if (
$linkstatus[code]!="200") {
      
$link[status]="<highlight><i>(down)</i></highlight>";
    } else {
      
$link[status]="";
    } 

Now save and upload links.php. For the next step go into your admin cp and edit template "links_listbit". Find:

PHP Code:

$link[title]</a></normalfont><br

Replace it with:

PHP Code:

$link[title]</a></normalfont> <smallfont>&nbsp;$link[status]</smallfont><br

Voila! If you want to test it, just enter a fictitious link with an obviously defunct URL. The word "down" should appear next to the link.

This may not work with some server configurations. If it doesn't, contact your web hosting company.

VampireMan 03-02-2003 08:20 PM

My demo updated , down link added :-)

eek , it says all my links are down lol

Aaron1 03-04-2003 09:51 AM

I just have one small problem, the time on the main links folder page doesn't seem to update when a link is submitted?

Btw: I have modified the links page alot, i also removed the rating stuff column, because that causes to many pop-ups and it disturbes viewing the submitted site.

Take a look if you want, on how it looks and works on my site:
http://www.housequake.com/forum/links.php

N!ck 03-04-2003 08:52 PM

Make sure you're upped to 0.1.4. If you followed the instructions, there should be a link "Update Folders" in your left frame. Click that when you delete or move a link (unless it's old anyway) and the main links page will have the correct information.

N!ck 03-04-2003 08:55 PM

BTW, looks great! :)

VampireMan 03-04-2003 10:25 PM

I agree i like the layout & scheme of that site. I wish i was that good at stuff lol.

What's suprising is i like the site even though im not a prince fan :-)

Aaron1 03-05-2003 08:37 AM

Thanks for the compliments guys!
Although my knowledge on PHP is very slim :-)

But back to my problem, i still can't figure out what i did wrong, i checked every template and php file, and also made sure that i updated the folders in admin links.php, but nevertheless the problem still remains. What could i have overlooked?

The example URL at:
http://www.in-here.co.uk/forum/links.php?s=
(i took the liberty to add a test link there, sorry for that)
Seems to have the same problem. The latesttime on the main link folder page doesn't seem to update, however the date works fine i guess.

Besides from this this small problem, i think this hack is great!
Wouldn't it be even nicer if members from the board could comment it, just as if the link was a discussion topic? Well, i am just thinking out load :)

VampireMan 03-05-2003 02:47 PM

Dont worry , i dont mind :p , adds another number to the list.
im glad you wernt member 100 ... what would you have done with a voucher from a wedding shop ?

lol

I went into the acp links admin & updated the folders & everything seems ok now

Aaron1 03-05-2003 02:56 PM

Quote:

Originally posted by VampireMan
I went into the acp links admin & updated the folders & everything seems ok now
Yes, you're link dates looks good, but what about the time? All links are posted at exaclty 12:00 AM? (on your main link page that is) Hmmm

Rebel38 03-11-2003 10:01 AM

How do I get links to show up on my mainpage? I use myvbindex
Thanks
Rebel

Kars10 03-11-2003 10:47 AM

Quote:

Originally posted by Aaron1


Yes, you're link dates looks good, but what about the time? All links are posted at exaclty 12:00 AM? (on your main link page that is) Hmmm

...same here! :(

N!ck 03-15-2003 04:54 AM

Oooooh...I just noticed what you're talking about. Hold on.

Aaron1 03-15-2003 01:26 PM

No problem!
Everything works perfect now!
It looks like this hack is out of his beta stage?

Best regards,

Aaron

Kars10 03-15-2003 03:56 PM

Thank you too nick!!

Works like a charm -> Full Relase :)

Regards
Kars

girlzclan 03-16-2003 05:27 PM

I'm getting errors and I have no idea how to fix them. When I click on a category in my links section I get

Code:

Database error in vBulletin 2.2.9:

Invalid SQL: SELECT COUNT(*) AS count FROM link WHERE folderid='1' ORDER BY sponsor DESC, points/voters DESC, title LIMIT 0,
mysql error: You have an error in your SQL syntax near '' at line 1

mysql error number: 1064

Date: Sunday 16th of March 2003 02:23:06 PM
Script: http://www.girlzclan.com/forums/foru...der&folderid=1
Referer: http://www.girlzclan.com/forums/links.php

In my admin control panel the only links I have for the links system is
vB Links System
Add Folder | Edit Folders
Edit Link | Update Folders

N!ck 03-18-2003 09:23 PM

Per installation documentation:

Quote:

Also, please be sure to edit your options. Even if you leave them alone, you must click "Save Changes" for everything to work properly.

jackyhow 03-20-2003 05:43 PM

i have the same problem as girlzclan

N!ck 03-21-2003 04:11 AM

Did you not just read my post?

jackyhow 03-21-2003 11:24 AM

sry, i'll try again. lol

Prankster 03-24-2003 07:00 AM

very very nice this hack

thx for your work and your time
and thx for sharing with us.

/me klicks install

girlzclan 03-24-2003 08:50 AM

Well, I don't know what I did ... but it's working now :)

daFish 04-03-2003 10:05 AM

Great Hack. Just installed it and seems to working good for me.

-Fish

daFish 04-03-2003 10:42 AM

OK. After installing the hack and doing everything wanted, i have the same SQL problem which encountered some postings before.

I don't know what to do. And yes i've read the whole thread. ;)

-Fish

daFish 04-03-2003 02:48 PM

Is working now. :D

-Fish

xpguy 04-04-2003 05:24 PM

i cant get mine to show up after i upgradede my board to vb 2.3.0 final :( any ideas?

Frozen Dreams 05-02-2003 08:31 PM

this was like a 5 second thing - and i havent encountered problems when working with it yet :D

so great work
[high]* Frozen Dreams clicks install[/high]

Big Jim 05-04-2003 09:34 PM

I get this after installing your 'down' link hack

Warning: Call-time pass-by-reference has been deprecated - argument passed by value; If you would like to pass it by reference, modify the declaration of fsockopen(). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file. However, future versions may not support this any longer. in /home/httpd/clients/www/bcsportbikes/htdocs/www.bcsportbikes.com/forum/links.php on line 71

Any ideas?


All times are GMT. The time now is 06:48 PM.

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.01331 seconds
  • Memory Usage 1,867KB
  • 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
  • (1)bbcode_code_printable
  • (6)bbcode_php_printable
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete