PDA

View Full Version : Links and Files Database


Pages : 1 2 [3] 4 5

AndrewD
06-26-2004, 05:34 AM
I just installed 1.25, first time.

Wondering why link count doesn't show up for local files?

Do you mean the count of links within a given category? By default, the count only includes links one level down. If you want to show the number of links in all child categories, you (currently) need to edit one of the templates.

Edit link_catbit and change the variables $catsub and $catentry to be $catchildsub and $catchildentry.

If I've misunderstood, let me know.

ImportPassion
06-27-2004, 12:58 AM
ya, that explains it.

On the main page it doesn't show cause I have...
Downloads > Manuals (no links) > all links
Downloads > blah (no links) > all links

also, when someone rates a local file, the rating replaces the file size.

AndrewD
06-27-2004, 05:46 AM
ya, that explains it.

On the main page it doesn't show cause I have...
Downloads > Manuals (no links) > all links
Downloads > blah (no links) > all links

also, when someone rates a local file, the rating replaces the file size.

Have you modified the links_linkbit template? I think I see the problem you mention (Trunks), but looking at the html for that page, it doesn't match the code I released. On my site, the release code shows up both size and rating.

Ranma2k
06-27-2004, 10:02 AM
I have two questions/suggestions:

a) did you install version 1.25 fresh or upgrade from an earlier version? If you upgraded, did you remember to run the local_links_install script?

b) which version of MySQL are you using? If it is earlier than 3.23.23 (I think), this version will not work. Most people are using version 4.0.something.

sorry for the later reply

what i did is upgrade from ver 1.22

as for mysql
the isp said it's 3.23.23 stable ver

AndrewD
06-27-2004, 11:58 AM
sorry for the later reply

what i did is upgrade from ver 1.22

as for mysql
the isp said it's 3.23.23 stable ver

Looking at the MySQL documentation, FULLTEXT searching IN BOOLEAN MODE (which is what version 1.25 uses) only works with MySQL verion 4.0.1 and higher. I'm sorry. I think you'll have to stick with version 1.22.

I will correct this in version 1.30 for those using MySQL 3.23.23 or higher.

ImportPassion
06-28-2004, 01:02 AM
Have you modified the links_linkbit template? I think I see the problem you mention (Trunks), but looking at the html for that page, it doesn't match the code I released. On my site, the release code shows up both size and rating.

I did, but only to add a br tag


<span class="smallfont">
<if condition="$linknew">
<b>
</if>
<a href="local_links.php?action=jump&amp;id=$linkid" target="_blank">$linkname</a>
<if condition="$linknew">
</b>
</if>
<if condition="$linkstatus>1">
<br />[size: $linkstatus kb]
</if>
<if condition="$linkstatus<=0">
<br />[[status unknown]
</if>
$linkratebit
</span>


also, is this a typo? <br />[[status unknown]

ImportPassion
06-28-2004, 01:06 AM
ok, i went back and looked at the link and did an edit and just submitted, and both showed up. maybe it couldn't get the filesize at the time?

works now.

hitmanuk2k
06-29-2004, 02:37 PM
what is the causing this problem? go to http://forum.pesinsight.com/local_links.php?action=links&catid=7 and click on any link.

AndrewD
06-29-2004, 02:43 PM
what is the causing this problem? go to http://forum.pesinsight.com/local_links.php?action=links&catid=7 and click on any link.

No idea! - what's the history? Did you have this hack installed and working, what version are you using, etc.

It's usually a good idea with these non-specific database problems first to check your database, for example go to the normal VBulletin admincp, Import and Maintenance, Repair/Optimise Tables.

Feel free to send me a PM with more details.

chrisvonc
06-29-2004, 02:43 PM
I would say post the error message that is getting mailed to you for better trouble shooting suggestions. :)

hitmanuk2k
06-29-2004, 03:24 PM
hi, for your informations i repaired the tables several times today but the problem keeps reoccuring. The hack had been working fine for around 2 months then suddenly these errors pop up. vb version 3.0.0

the error message is the same as on the site:

----------

Database error in vBulletin 3.0.0:

Invalid SQL:
INSERT INTO local_linksdownloads (linkid, linkurl, username, userid, userip, userbrowser, usertime)
VALUES (
'41',
'http://forum.pesinsight.com/showthread.php?t=8678',
'Unregistered',
'0',
'XXXX',
'Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; DT)',
1088524553
)

mysql error: Duplicate entry '32767' for key 1

mysql error number: 1062

Date: Tuesday 29th of June 2004 11:55:55 AM
Script: http://forum.pesinsight.com/local_links.php?action=jump&id=41
Referer: http://www.google.de/search?q=rebuild+afs+with+more+space&ie=UTF-8&hl=de&meta=
Username: Unregistered
IP Address: XXXX

AndrewD
06-29-2004, 04:48 PM
hi, for your informations i repaired the tables several times today but the problem keeps reoccuring. The hack had been working fine for around 2 months then suddenly these errors pop up. vb version 3.0.0

the error message is the same as on the site:

I think your problem is that Google and other search engines are coming along and accessing all your files. Every time this happens, the downloads table logs it. You've had more than 32K hits since you reset the downloads table.

Immediate suggestions:
- If you're not too concerned about tracking who is downloading what, empty the local_linksdownloads table.
- You can do this in a couple of ways. If you go to the links admin page, there's an option in the statistics section to view/clear the dowloads. Or use phpmyadmin and empty this table.
- You might ask yourself if you really want Google stealing all your band width. Are all your links set to be available without being logged on? You might change this/

I will modify the table definition with the next release so that we don't hit this problem so soon, but it will still be there. I might put some code in to stop bots downloading links.

Thoughts?

hitmanuk2k
06-29-2004, 08:27 PM
thanks for the information. i will just empty the table.

Natch
06-30-2004, 09:08 AM
Run this query:ALTER TABLE `local_linksdownloads` CHANGE `dlid` `dlid` MEDIUMINT( 11 ) NOT NULL AUTO_INCREMENT Should solve the problem :) (11 digits for a smallint ? even overkill for a mediumint ... but hey ;))

krohnathlonman
07-03-2004, 05:24 PM
OUCH! I just tried using this for a couple of files I posted (DX9.0c). It was linked as a normal file and then when I switched to a link using this system the loads jumped from .3 to over 2.0! that's from 1.25 beta....

I really haven't checked into it very much yet to help determine the cause of this within your sytem. I will be doing so as soon as I can right now I'm tweaking some of my own systems to run even better ;) google has started placing me alot better recently in some important key words so I've been getting alot more traffic lately.

krohnathlonman
07-04-2004, 02:12 AM
OK, basically don't use fopen on any large files since it loads that file into the RAM and it can't exit until the file download is completed. Basically just using the normal redirect is the only thing to do for larger files. You'll want to search google for bandwidth theft to learn some .htaccess methods of blocking refs not from your domain.

JirQUEST
07-06-2004, 02:29 PM
does this work on 3.0.2??

EnriqueHavoc
07-08-2004, 01:52 AM
Hi Andrew thanks for this awesome script.

*note- Im using 1.22 because my php/mysql is not up to date so i apologize if this has been address in 1.25

Question: How can I alternate the linkbit TD colors for each link and category displayed?

Ive tried editing the linkbit using if conditions with $linkid and it works but when the links are sorted, it throws off the alternating sequence. How can I edit the templates so that the links/categories will always alternate color regardless of how they are sorted?

JirQUEST
07-08-2004, 02:11 AM
does this work on 3.0.2??

ok never mind. it works on 3.0.3 :D

vonedaddy
07-10-2004, 04:33 AM
I installed an it works great. Thanks... ONE QUICK QUESTION... Where in the templates is the forum jump?? I would like to remove the forums jump drop down menu.

See it here : http://hereyah.com/forums/local_links.php?action=links

Natch
07-21-2004, 10:41 AM
I have moved over to using vBa CMPS - here is my new module for tha tportal to show the last month's most popular links: Link to original posting of this module on vBa homepage (http://www.vbadvanced.com/forum/showthread.php?t=1319)

My members requested a different count of the hits - one that "reset" every month to show the current most popular links, not just the All time most popular links...

So I did it.

Replace your current hotlinks.php / install a hotlinks.php module with the following contents:<?
// ######################## USER-EDITABLE VAR ############################
// If you want to use the standard VBulletin database table prefix, comment out
// the following line and uncomment the line after it
define('THIS_TABLE', 'local_');
// define ('THIS_TABLE', TABLE_PREFIX);
//
// ######################### REQUIRE BACK-END ############################
require_once('./global.php');
require_once('./includes/functions_misc.php');

global $DB_site, $vboptions, $forumcache;

$limit = "3"; // default number of HotLinks to display in case not set in database

$links_permissions = array();
$links_defaults = array();

$asb = $DB_site->query("SELECT * FROM ".THIS_TABLE."linksadmin");
while ($admin_settings = $DB_site->fetch_array($asb)) {
if (substr($admin_settings["settingname"],0,3) == "can") {
$array = preg_split("/[\s,]+/", $admin_settings["setting"]);
$links_permissions[$admin_settings["settingname"]] = iif(in_array($bbuserinfo[usergroupid], $array), 1, 0);
} else {
$links_defaults[$admin_settings["settingname"]] = $admin_settings["setting"];
}
}

if (isset($links_permissions[can_see_protected_links_on_portal])) {
$cansee = $links_permissions[can_see_protected_links_on_portal];
} else {
$cansee = 0;
}

$thismonth = vbdate("n")-1;
$thisyear = vbdate("Y");
$lastmonth = vbmktime("6","0","0",$thismonth,"1",$thisyear);

$filter = "WHERE link.linkmoderate = 0 AND ldown.usertime > $lastmonth ";

if (!$cansee) {
$limitfids = array(0);
$forumperms = array();
foreach ($forumcache AS $forum) {
$forumperms["$forum[forumid]"] = fetch_permissions($forum['forumid']);
if (!($forumperms["$forum[forumid]"] & CANVIEW) || !($forumperms["$forum[forumid]"] & CANVIEWOTHERS)) {
$limitfids[] = $forum['forumid'];
}
}
$filter .= 'AND link.linkforum NOT IN ('.implode(',', $limitfids).') ';
}

if (isset($links_defaults[categories_seen_on_portal])) {
$catsee = $links_defaults[categories_seen_on_portal];
} else {
$catsee = '';
}
if ($catsee != '') $filter .= 'AND ltoc.catid IN ('.$catsee.')';

if (isset($links_defaults[links_seen_on_portal])) {
$linksee = $links_defaults[links_seen_on_portal];
} else {
$linksee = $limit;
}

$hotquery = "
SELECT DISTINCT link.linkid AS linkid, link.linkname AS linkname, link.linkdesc AS linkdesc,
COUNT(ldown.usertime) AS linkhits, link.linkstatus AS linkstatus,
ltoc.catid AS linkcatid, link.linkhits AS olinkhits
FROM ".THIS_TABLE."linkslink AS link
LEFT JOIN ".THIS_TABLE."linksdownloads AS ldown
ON link.linkid = ldown.linkid
LEFT JOIN ".THIS_TABLE."linksltoc AS ltoc
ON link.linkid = ltoc.linkid
$filter
GROUP BY olinkhits ORDER BY linkhits DESC
LIMIT $linksee
";

$hotties = $DB_site->query($hotquery);

while ($myrow=$DB_site->fetch_array($hotties)) {
$linkid = $myrow["linkid"];
$linkname = parse_bbcode2($myrow["linkname"], 1, 1, 1, 1);
$linkdesc = parse_bbcode2($myrow["linkdesc"], 1, 1, 1, 1);
$linkhits = $myrow["olinkhits"];
$monthhits = $myrow["linkhits"];
$linkstatus = $myrow["linkstatus"];
if ($linkstatus > 1) { // filesize, convert to KB
$linkstatus = intval (round($linkstatus / 1024));
}
eval('$hotlinksbits .= "' . fetch_template('adv_portal_hotlinksbits') . '";');
$nhits++;
}
eval('$home[$mods[\'modid\']][\'content\'] = "' . fetch_template('adv_portal_hotlinks') . '";');
?>

Enjoy!

digicreations
07-21-2004, 12:01 PM
is there anyway to get this nice system to handle ftp protocol for public ftp's?

AndrewD
07-26-2004, 04:08 AM
is there anyway to get this nice system to handle ftp protocol for public ftp's?

I think this will be possible - the php routine the hack uses can handle FTP exactly as HTTP. Next version.

AndrewD
07-26-2004, 04:10 AM
I installed an it works great. Thanks... ONE QUICK QUESTION... Where in the templates is the forum jump?? I would like to remove the forums jump drop down menu.

See it here : http://hereyah.com/forums/local_links.php?action=links

Sorry for the delay - vacation time :). It's in the links_header template

AndrewD
07-26-2004, 04:11 AM
Hi Andrew thanks for this awesome script.

*note- Im using 1.22 because my php/mysql is not up to date so i apologize if this has been address in 1.25

Question: How can I alternate the linkbit TD colors for each link and category displayed?

Ive tried editing the linkbit using if conditions with $linkid and it works but when the links are sorted, it throws off the alternating sequence. How can I edit the templates so that the links/categories will always alternate color regardless of how they are sorted?

I'll deal with this in the next version. Thanks.

EnriqueHavoc
07-29-2004, 07:54 PM
Thanks very much.. hope you had a good vacation!

Another question:

When linking to an external file, it appears the file is using twice the bandwidth I would expect.. First when its pulled from the external host, and then again when it goes through local_links on my host... is this by design?

AndrewD
08-02-2004, 04:29 AM
Thanks very much.. hope you had a good vacation!

Another question:

When linking to an external file, it appears the file is using twice the bandwidth I would expect.. First when its pulled from the external host, and then again when it goes through local_links on my host... is this by design?

That's probably right, as each file is read by the server and then re-written to the client. It's by design as part of the "anti leech" process. It is easy to change if necessary, but bandwidth is less of a concern for our site than theft.

On your earlier question, it's straightfoward to have alternating "alt1" and "alt2" bands in the link and category displays. A few lines of code (in get_linklistbit, etc) keep a variable in even/odd sequence, and the link and category templates have to be modified to use that variable when setting the style.

Natch
08-02-2004, 05:33 AM
Could you post the modification (or add it as an option) to provide the anti-leech facade but without the passthru (if possible)?

SandsUSA
08-02-2004, 01:21 PM
Could you post the modification (or add it as an option) to provide the anti-leech facade but without the passthru (if possible)?
Yes, I'd be interested in reducing my bandwidth also.....

AndrewD
08-02-2004, 07:06 PM
Could you post the modification (or add it as an option) to provide the anti-leech facade but without the passthru (if possible)?

Will do. Give me a few days to check the side effects...

Natch
08-03-2004, 04:32 AM
Thanks buddy :)

AndrewD
08-03-2004, 04:35 AM
Those concerned about bandwidth and not about file theft might try the following patch. Edit local_links.php and find line: (about line 1900, depending on version)

if ($_REQUEST['action'] == "jump") {

About 50 lines further down find these lines
if (!is_array($mimetype)) {
// no mimetype, so assume this is a regular link
$hit = record_hit($id, $url, $LINK_OK);
eval(print_standard_redirect('Redirecting.',0));
} else {


Change the if (!is_array($mimetype)) { to something that is always true, e.g. if (1) {

All link/file accesses will then be handled as redirects, so I imagine this will reduce bandwidth use for files with known mimetypes coming from a remote site.

The change will have no effect for filetypes that do not have recognised filetypes, and I suspect that it will have little if any effect for files held on your own server (but I may be wrong).

However, this improvement is at the cost of potentially making visible where the files are stored and it also causes one or two changes in the way windows are opened.

Appreciate feedback. Cheers.

Natch
08-03-2004, 04:40 AM
So there is no way to have leech-protection on but without the doubled bandwidth use?

AndrewD
08-03-2004, 05:09 AM
So there is no way to have leech-protection on but without the doubled bandwidth use?

Not that I've found. Seems to me that you either ask the server to read the file and pass it on in a controlled way to the client (sequences of fopen/fread/fclose), or you ask the client to go away and read the file for itself (javascript or meta tag). If the server reads the file, then by definition twice the bandwidth is used. If the client reads the file, then you have to tell it which file to read.

But I may be wrong :rolleyes: and would be delighted to learn :squareeyed:

Natch
08-03-2004, 11:05 AM
You should be able to cause your PHP script to redirect to a second PHP script designed just to mask the location - it would contain just a Header: mime-type yadda yadda statement followed by the contents of the file - if the file is local then there hsould be no bandwidth increase ... am I totally off base here ?

AndrewD
08-03-2004, 11:09 AM
You should be able to cause your PHP script to redirect to a second PHP script designed just to mask the location - it would contain just a Header: mime-type yadda yadda statement followed by the contents of the file - if the file is local then there hsould be no bandwidth increase ... am I totally off base here ?

Yes, that's essentially what the current code does, and it works fine. The question that was raised concerns the increased bandwidth when the file to be downloaded is held on a third machine. In that case, the main server has to read the file before downloading it. Alternatively the browser can be told to launch itself and read the third party file, but in that case one cant keep the location secret.

lmongello
08-05-2004, 08:24 PM
Forgive the stupid question, but I'm going crazy with this...

I want to restrict access to this page to registered members only. I tried creating a forum with a link to local_links.php using permissions in the Vb Admin, but that prevents unregistered members from seeing the list only.

I want them to see the forum (or sub-forum, etc.), but if they try and acess it, they get redirected to the "Sorry, you are not logged in or registered" page.

Hoping someone here can help!!

Thanks!!!!!

AndrewD
08-06-2004, 04:25 PM
Forgive the stupid question, but I'm going crazy with this...

I want to restrict access to this page to registered members only. I tried creating a forum with a link to local_links.php using permissions in the Vb Admin, but that prevents unregistered members from seeing the list only.

I want them to see the forum (or sub-forum, etc.), but if they try and acess it, they get redirected to the "Sorry, you are not logged in or registered" page.

Hoping someone here can help!!

Thanks!!!!!

You want all the subcategories in a category to be visible regardless of their forum protection, but to trigger a login page if someone tries to drill down into a category that is protected for member access only?

I think this will work:

Edit local_links.php
Find lines (about line 600 or so)


// Get categories at this level
foreach ($linkscat AS $thiscat) {
if ($thiscat["parentid"] == $viewcatid and !in_array($thiscat["catforum"], $limitfids)) {
if ($thiscat['catmoderate'] and $bbuserinfo['userid'] != $thiscat['catuserid']) continue;


Replace by


// Get categories at this level
foreach ($linkscat AS $thiscat) {
if ($thiscat["parentid"] == $viewcatid) {
if ($thiscat['catmoderate'] and $bbuserinfo['userid'] != $thiscat['catuserid']) continue;


Let me know if this is what you want, and if this should be a switch on the admin page

tteal
08-11-2004, 09:22 PM
First and foremost, thank you for making this modification available! Secondly, I was wondering if I could make a recommendation?

- For each "affiliate", would it be possible to add a feature on for users to be able to post a comment on their experience? I realize that you're rating the affiliate, however, comments help out a lot to discuss what you liked/dis-liked about their service, etc.

Thanks,
Tim

Natch
08-11-2004, 11:48 PM
Yes, that's essentially what the current code does, and it works fine. The question that was raised concerns the increased bandwidth when the file to be downloaded is held on a third machine. In that case, the main server has to read the file before downloading it. Alternatively the browser can be told to launch itself and read the third party file, but in that case one cant keep the location secret.
Thanks for clarifying - my mistake - I guess my increased bandwidth is jsut cos I'm getting more visitors ;)

Polo
08-12-2004, 08:17 PM
Awesome Addon!

Clicks install

AndrewD
08-13-2004, 03:31 AM
First and foremost, thank you for making this modification available! Secondly, I was wondering if I could make a recommendation?

- For each "affiliate", would it be possible to add a feature on for users to be able to post a comment on their experience? I realize that you're rating the affiliate, however, comments help out a lot to discuss what you liked/dis-liked about their service, etc.

Thanks,
Tim

I think this is an excellent idea. I'll think about how easy it is to add on without writing loads of new code - in effect we're looking for a way to tie a new VB discussion thread to a link.

darkmage
08-13-2004, 01:50 PM
Thanks for clarifying - my mistake - I guess my increased bandwidth is jsut cos I'm getting more visitors ;)
I have an idea, I'm not sure if it was discussed in pages before this one but, if you use this script as a downloads page for your website, would it be possible to link to the file directly but make a entry page if coming from an outside website.

Such as if you come from google.com and you request http://forums.blah.com/local_links.php?action=jump&id=1 it would not request the file directly, but it would open up a page that you must first click the download now link before you can continue with the download. Therefore making it 100% (I think) leech proof. However right now I am using the method where users must be logged in before they can download a file.

Meltingfire
08-14-2004, 12:35 PM
I love your script and have been using it for a pretty long time now! Great work!

But lately i have noticed a small problem when linking to files at SourceForge, both in v1.10 and still in v1.25 (upgraded today).

Since you link to a zip-file at sourceforge the url ends with ".zip" but when you click on the link you get to a webpage with mirrors.

So when you try to download the file you get a text file (name.zip) that contains the HTML page.

Is it possible for the links & filedatabase to be able to check if its really a zip-file and if its not then the webpage will be shown instead with the mirrors at sourceforge.

(Btw, it can be any file-formats, not only zip)

AndrewD
08-14-2004, 07:22 PM
I love your script and have been using it for a pretty long time now! Great work!

But lately i have noticed a small problem when linking to files at SourceForge, both in v1.10 and still in v1.25 (upgraded today).

Since you link to a zip-file at sourceforge the url ends with ".zip" but when you click on the link you get to a webpage with mirrors.

So when you try to download the file you get a text file (name.zip) that contains the HTML page.

Is it possible for the links & filedatabase to be able to check if its really a zip-file and if its not then the webpage will be shown instead with the mirrors at sourceforge.

(Btw, it can be any file-formats, not only zip)

I see what you mean. There's a signal, which is the parameter after the .zip file name at sourceforge, i.e. ?download. I'll check whether we can do anything about this.

AndrewD
08-15-2004, 05:00 AM
Sourceforge provides links that have URLs looking like zip files, etc, but are treated as an instruction to redirect to the mirrors page where you actually choose the mirror you want. Perhaps other sites do the same. Versions of this hack up to 1.25 fail to spot this and give you a download which is actually the html code for the redirect.

To fix this, find the following code in local_links.php (line 1896 in version 1.25)


$dfname = basename($urlInfo['path']);
$type = substr(strrchr($dfname, "."), 1);

$mimetype = get_mimetype($type);

if (!is_array($mimetype)) {


Replace
if (!is_array($mimetype)) {
with
if (!is_array($mimetype) or $urlInfo['query'] != "") {

This should fix the problem. Please advise.

AndrewD
08-15-2004, 05:17 AM
I have an idea, I'm not sure if it was discussed in pages before this one but, if you use this script as a downloads page for your website, would it be possible to link to the file directly but make a entry page if coming from an outside website.

Such as if you come from google.com and you request http://forums.blah.com/local_links.php?action=jump&id=1 it would not request the file directly, but it would open up a page that you must first click the download now link before you can continue with the download. Therefore making it 100% (I think) leech proof. However right now I am using the method where users must be logged in before they can download a file.

I have another thought, which is to put a <meta name="robots" content="index, nofollow"> tag in the links_header template. (i.e. the engine can check the page for links but must not follow those links, i.e. trigger a download). Anyone know whether search engines are reliable on this? - years ago, reports were that many did not interpret the tag. Google follows the rules, I think.

Natch
08-16-2004, 12:02 AM
Good work on the continued support - this script is gaining in maturity every day :D

darkmage
08-16-2004, 04:02 AM
Good work on the continued support - this script is gaining in maturity every day :D
I was wondering that since you have the categories ordered by their alphabetical order, could you tell me the line of code to change to make it so it orders the categories by their ID?

Thanks.

AndrewD
08-16-2004, 06:01 AM
I was wondering that since you have the categories ordered by their alphabetical order, could you tell me the line of code to change to make it so it orders the categories by their ID?

Thanks.

Look for the following (about 150+ lines in to local_links.php depending on version)

function get_linkscat() {
global $DB_site, $linkscat, $linkscat_set;

if (!$linkscat_set) {
$asb = $DB_site->query("SELECT * FROM ".THIS_TABLE."linkscat ORDER BY catname");


Change catname to catid or catdate as you will.

Should this be a configuration option?

darkmage
08-16-2004, 03:13 PM
Look for the following (about 150+ lines in to local_links.php depending on version)

function get_linkscat() {
global $DB_site, $linkscat, $linkscat_set;

if (!$linkscat_set) {
$asb = $DB_site->query("SELECT * FROM ".THIS_TABLE."linkscat ORDER BY catname");


Change catname to catid or catdate as you will.

Should this be a configuration option?
Thank you soo much! I would say that this would be a nice little configuration option. :)

kingady
08-17-2004, 01:43 PM
<a href="http://www.hl2insider.net/forums/local_links.php" target="_blank">http://www.hl2insider.net/forums/local_links.php</a>

ive set it up, im in admin area, now how do i add categories? ive tried everything to add categories/files, help ;p

AndrewD
08-17-2004, 01:49 PM
http://www.hl2insider.net/forums/local_links.php

ive set it up, im in admin area, now how do i add categories? ive tried everything to add categories/files, help ;p

You use the left hand item on the Links toolbar (Links). The drop down will have an item "Add Category".

kingady
08-17-2004, 01:52 PM
thanks alot mate, also this is members only access right?

AndrewD
08-17-2004, 01:53 PM
thanks alot mate, also this is members only access right?

You set the permissions in the admin panel - Each action (view, add, edit, delete/link, category) has its own set of permissions

kingady
08-17-2004, 01:55 PM
ooops, sorry i meant for downloading the files.

also is it possible to mask the download link for example:

download link: www.sitename.com/video/file.rar

to www.sitename.com/forums/local_links.php?getfile=3

if u understand what i mean =)

AndrewD
08-17-2004, 04:27 PM
ooops, sorry i meant for downloading the files.

also is it possible to mask the download link for example:

download link: www.sitename.com/video/file.rar

to www.sitename.com/forums/local_links.php?getfile=3

if u understand what i mean =)

Access to individual links and categories is controlled by assigning them to a forum on your board. Create a standard VBulletin forum which is only visible to your members. Then, go into the links admin panel, and set the default_forumid setting to the forumid of that forum. Then, by default all your new links will be protected from non-members.

kingady
08-17-2004, 09:36 PM
so the forum id is for example: http://www.hl2insider.net/forums/forumdisplay.php?f=17

17?

because i added a members only section that members can only see (forum) and i entered the forum id 27 because the ending was 27 am i correct?

becausei tried it , still didnt work

AndrewD
08-18-2004, 04:00 AM
so the forum id is for example: http://www.hl2insider.net/forums/forumdisplay.php?f=17

17?

because i added a members only section that members can only see (forum) and i entered the forum id 27 because the ending was 27 am i correct?

becausei tried it , still didnt work

That's right and it should work - but you need to apply the setting also to any links/categories that you created *before* setting forumid 27 as your default. If you PM details of an admin account on your board, I'll take a quick look.

kingady
08-18-2004, 01:05 PM
aye i pmed u details and minutes later i knew what u meant, im kinda slow.. lol thanks!!!!!!!!!!!!

kingady
08-18-2004, 01:06 PM
ive fixedi t ;p thanks alot, great script

AndrewD
08-18-2004, 04:38 PM
ive fixedi t ;p thanks alot, great script

Good, and good luck!

animehawk
08-19-2004, 10:50 AM
Anderew, Great mod, It's exactly what i'm looking for to manage my downloads. I do have a small problem. I installed this mod late last night and seem to be running into an error.
http://www.animesanction.net/testsite/forum/local_links.php?action=jump&id=1 That is the link to the only link i have posted thus far and it just brings up a blank page. It is a local download and it does display the size of the file in the links table.
http://www.animesanction.net/testsite/forum/local_links.php

The file type is setup in my admincp.

AndrewD
08-19-2004, 10:54 AM
Anderew, Great mod, It's exactly what i'm looking for to manage my downloads. I do have a small problem. I installed this mod late last night and seem to be running into an error.
http://www.animesanction.net/testsite/forum/local_links.php?action=jump&id=1 That is the link to the only link i have posted thus far and it just brings up a blank page. It is a local download and it does display the size of the file in the links table.
http://www.animesanction.net/testsite/forum/local_links.php

The file type is setup in my admincp.

PM me an admin userid and pwd for your test board, as I can't tell anything without looking a bit deeper

animehawk
08-19-2004, 11:45 AM
Thanks a bunch for your help. I have PM'd the requested info.

BioVader
08-20-2004, 09:56 AM
AndrewD,
I've installed this program as a way to offer downloads on my site for registered users. Also as a way to keep people from linking my downloads to their site and chewing up my bandwidth....

The Categories work fine but I'm limited with only 5 downloads showing up per Category. I've tried changing the links_per_page to a higher number but it still only shows 5 links.... Now I have these set up with a forum permission which only allows registered users to view. Do you have any idea on how to fix this?

Here is a link to my Links Directory (File Downloads)

http://team-undercover.com/forums/local_links.php?

AndrewD
08-20-2004, 10:05 AM
AndrewD,
I've installed this program as a way to offer downloads on my site for registered users. Also as a way to keep people from linking my downloads to their site and chewing up my bandwidth....

The Categories work fine but I'm limited with only 5 downloads showing up per Category. I've tried changing the links_per_page to a higher number but it still only shows 5 links.... Now I have these set up with a forum permission which only allows registered users to view. Do you have any idea on how to fix this?

Here is a link to my Links Directory (File Downloads)

http://team-undercover.com/forums/local_links.php?

I see what you mean - but you've changed the templates? Have you removed the pagenav?

can you also try going into your main admincp/thread display options and change the number of posts per page and see what that does

BioVader
08-20-2004, 09:03 PM
I change the settings in the admincp options but it's still the same...
This is what links_main looks like.....

<if condition="$viewcatname">
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr align="center">
<td class="tcat" align="center"><strong>$viewcatname</strong>
<if condition="$catclosed != 0"><span class="smallfont">[closed]</span></if>
</td>
</tr><tr>
<td class="alt1" align="center"><span class="smallfont"><if condition="$show['member']"><b>You are ready to download</a></b>
</if>
<if condition="$show['registerbutton']"><b>You must first <a href="register.php?$session[sessionurl]">$vbphrase[register]</a> before you can download files. </b>
</if></span></td>
</tr>
</table>
<br />
</if>
<if condition="$catlistbit">
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr align="center">
<td class="tcat" align="center" width="20%"><strong>Category</strong></td>
<td class="tcat"><strong>&nbsp;Description</strong></td>
</tr>
$catlistbit
</table>
<br />
</if>
<if condition="$linklistbit">
<table cellpadding="0" cellspacing="0" border="0" width="100%" style="margin-bottom:3px">
<tr valign="bottom">
<td align="$stylevar[right]">
<if condition="$show['pagenav']">$pagenav</if>&nbsp;
<if condition="$searchnav">
<span class="smallfont">sort by
<a href="local_links.php?catid=$viewcatid&amp;page=$pagenumber&amp; sort=N">title</a>&nbsp;
<a href="local_links.php?catid=$viewcatid&amp;page=$pagenumber&amp; sort=d">date</a>&nbsp;
<a href="local_links.php?catid=$viewcatid&amp;page=$pagenumber&amp; sort=h">hits</a>
</span>
</if>
</td>
</tr>
</table>
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr align="center">
<td class="tcat" align="center" width="20%"><strong>Files</strong></td>
<td class="tcat"><strong>&nbsp;Description</strong></td>
</tr>
$linklistbit
</table>
<if condition="$show['pagenav']">
<table cellpadding="0" cellspacing="0" border="0" width="100%" style="margin-top:3px">
<tr valign="bottom">
<td align="$stylevar[right]">$pagenav</td>
</tr>
</table>
</if>
<br />
</if>

And the original I started with...

<if condition="$viewcatname">
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr align="center">
<td class="tcat" align="center"><strong>$viewcatname</strong>
<if condition="$catclosed != 0"><span class="smallfont">[closed]</span></if>
</td>
</tr><tr>
<td class="alt1"><span class="smallfont">$viewcattext</span></td>
</tr>
</table>
<br />
</if>
<if condition="$catlistbit">
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr align="center">
<td class="tcat" align="center" width="20%"><strong>Category</strong></td>
<td class="tcat"><strong>&nbsp;Description</strong></td>
</tr>
$catlistbit
</table>
<br />
</if>
<if condition="$linklistbit">
<table cellpadding="0" cellspacing="0" border="0" width="100%" style="margin-bottom:3px">
<tr valign="bottom">
<td align="$stylevar[right]">
<if condition="$show['pagenav']">$pagenav</if>&nbsp;
<if condition="$searchnav">
<span class="smallfont">sort by
<a href="local_links.php?catid=$viewcatid&amp;page=$pagenumber&amp; sort=N">title</a>&nbsp;
<a href="local_links.php?catid=$viewcatid&amp;page=$pagenumber&amp; sort=d">date</a>&nbsp;
<a href="local_links.php?catid=$viewcatid&amp;page=$pagenumber&amp; sort=h">hits</a>
</span>
</if>
</td>
</tr>
</table>
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr align="center">
<td class="tcat" align="center" width="20%"><strong>Entry</strong></td>
<td class="tcat"><strong>&nbsp;Description</strong></td>
</tr>
$linklistbit
</table>
<if condition="$show['pagenav']">
<table cellpadding="0" cellspacing="0" border="0" width="100%" style="margin-top:3px">
<tr valign="bottom">
<td align="$stylevar[right]">$pagenav</td>
</tr>
</table>
</if>
<br />
</if>

darkmage
08-21-2004, 02:49 AM
I have an idea / rant....

It would be great if you could make a type of comment system for the links system. Such as,

when you submit a new link it makes a post in the forum if you want it to with the title of the file you submitted and in the post it will include the description. I think that would be a great idea! ^_^

I'm just dreaming though, that sounds a bit much to ask for. But if you made something like that to add on to this, I would be very happy. =)

AndrewD
08-21-2004, 04:23 AM
I have an idea / rant....

It would be great if you could make a type of comment system for the links system. Such as,

when you submit a new link it makes a post in the forum if you want it to with the title of the file you submitted and in the post it will include the description. I think that would be a great idea! ^_^

I'm just dreaming though, that sounds a bit much to ask for. But if you made something like that to add on to this, I would be very happy. =)

I think this is a great idea, it's just a matter of finding the time... Soon!

lmongello
08-22-2004, 02:18 AM
Having problems and need to uninstall. Can you provide detailed instructions on how to do so and what I need to remove?

Thank you!! :)

AndrewD
08-22-2004, 10:02 AM
Having problems and need to uninstall. Can you provide detailed instructions on how to do so and what I need to remove?

Thank you!! :)

Rerun the installation script - it has an uninstall option

AndrewD
08-22-2004, 10:08 AM
Beta version 1.30 uploaded. Please test and report.

Wildthinks
08-22-2004, 06:49 PM
Hi,
is possible, that the preview is a flash (swf) or is hard to code?
Thank you
Thomas

AndrewD
08-24-2004, 04:08 AM
Hi,
is possible, that the preview is a flash (swf) or is hard to code?
Thank you
Thomas

I'd rather not get into handling Flash - it's not something I know anything about.

AndrewD
08-24-2004, 04:09 AM
Beta version 1.30 uploaded. Please test and report.

Re-uploaded beta 1.30 - small bug corrected in the error handling code

SteveK
08-24-2004, 05:45 AM
AndrewD-

Should line 2270 in local_links.php:

ORDER BY sequence

be changed to :

ORDER BY adminid ??

SteveK

AndrewD
08-24-2004, 01:57 PM
AndrewD-

Should line 2270 in local_links.php:

ORDER BY sequence

be changed to :

ORDER BY adminid ??

SteveK

No, it should be sequence - :ermm: if you are having problems, have you remembered to run the updated installation script to upgrade your database?

SteveK
08-24-2004, 02:17 PM
No, it should be sequence - :ermm: if you are having problems, have you remembered to run the updated installation script to upgrade your database?

Thanks, you are right. I did run the upgrade.... just against the wrong database. And when I got the error, I searched for the term in the install file but somehow missed it.

So far, no other problems. Haven't tried the import feature.

Thanks for your work.

SteveK

neroflorida
08-29-2004, 08:57 PM
I just installed this today. After entering about 100 links - many of which are cross-referenced, I discovered a bug with the multiple category assignments.

Entries under a category that are assigned to one or more other categories will appear a distance of at least one page apart from the orignal entry under the category.

For instance:
Link x is assigned to Categories A,B,C

For each category {A,B,C}, link x will appear once for each reference minus one in the tloc. (AxA, AxB; BxA, BxB; CxA, CxB) I assume that the minus one is the occurance of viewed category = catid.

Each occurance will appear a distance of 1 page apart. (I have not found instances where AxA, AxB appear on the same page under A, but will generally appear +1 pages apart.)

http://neroflorida.com/vb/local_links.php?action=links&catid=20 <-- a good example. There are 16 links under this category. The category is set to display 10 links per page. The actual number of pages is 3.2 (Should be 1.6 pages)

Thanks,

-Kris

zerinS4
09-06-2004, 02:19 PM
Installed 1.30, so far so good.

Warlord
09-06-2004, 08:49 PM
Nice Hack..

*clicks install*

How can I enable html in the descriptions?

vb code seems to work though..

AndrewD
09-07-2004, 04:21 AM
Nice Hack..

*clicks install*

How can I enable html in the descriptions?

vb code seems to work though..
HTML in descriptions and titles is deliberately disabled. vb code works properly. Is this a big issue? - it's not that hard to modify

AndrewD
09-13-2004, 06:06 PM
Version 1.35 uploaded for beta test

new:
- what's hot/what's new added to search code and header template
- jump syntax extended to allow action=jump&link="catname/linkname" for direct lookup and jump
- fix to pagination bug with multiple category assignments
- option to display file type icon in linkbit
- included code to build forum list (in case user has opted to turn this off)
- added admin options to force a redirect rather than read/rewrite (lower bandwidth/cpu at cost of exposing link source and no control over headers)

Reports please

SandsUSA
09-13-2004, 09:07 PM
Version 1.35 uploaded for beta test

new:
- what's hot/what's new added to search code and header template
- jump syntax extended to allow action=jump&link="catname/linkname" for direct lookup and jump
- fix to pagination bug with multiple category assignments
- option to display file type icon in linkbit
- included code to build forum list (in case user has opted to turn this off)
- added admin options to force a redirect rather than read/rewrite (lower bandwidth/cpu at cost of exposing link source and no control over headers)

Reports please
Wow, this is looking really good! Can't wait for the next "stable" release....

Code Monkey
09-18-2004, 06:05 AM
Great addition to my site. Thanks a bunch. It would be nice if it showed as a proper destination in "who's online." Instead of "Unknown Location."

Anyway, keep up the good work.

AndrewD
09-18-2004, 02:23 PM
Great addition to my site. Thanks a bunch. It would be nice if it showed as a proper destination in "who's online." Instead of "Unknown Location."

Anyway, keep up the good work.

Thanks.

To achieve this, you have to modify includes/functions_online.

See https://vborg.vbsupport.ru/showpost.php?p=482210&postcount=1 for instructions. I do mention this in the instructions :)

dethfire
09-18-2004, 02:25 PM
1.35 works great on 3.0.3, no problems yet

Code Monkey
09-18-2004, 04:58 PM
To achieve this, you have to modify includes/functions_online.

See https://vborg.vbsupport.ru/showpost.php?p=482210&postcount=1 for instructions. I do mention this in the instructions :)

Thanks. I am new to VB and had been wondering how to do this. :D

sinclac
09-20-2004, 04:11 AM
Version 1.35 uploaded for beta test

new:
- what's hot/what's new added to search code and header template
- jump syntax extended to allow action=jump&link="catname/linkname" for direct lookup and jump
- fix to pagination bug with multiple category assignments
- option to display file type icon in linkbit
- included code to build forum list (in case user has opted to turn this off)
- added admin options to force a redirect rather than read/rewrite (lower bandwidth/cpu at cost of exposing link source and no control over headers)

Reports please

When i try to upgrade it says it can't find the tables in the database but they are there.

AndrewD
09-20-2004, 05:27 AM
When i try to upgrade it says it can't find the tables in the database but they are there.

Did you change the table prefix? - the code by default assumes that the tables are called local_xxx. If you change this prefix, you need to edit both local_links.php and local_links_install.php accordingly. See instructions.

Let me know if this doesn't work for you.

???`S?LV?R???`
09-20-2004, 11:04 AM
Why does it show the source of the download when I set it to a remote site? (it doesn't show when the file is stored on the local website though)? And is there any way to fix this?

sinclac
09-20-2004, 12:24 PM
Did you change the table prefix? - the code by default assumes that the tables are called local_xxx. If you change this prefix, you need to edit both local_links.php and local_links_install.php accordingly. See instructions.

Let me know if this doesn't work for you.

No i have changed nothing, if i look in the DB the tables are as you said they should be.

AndrewD
09-20-2004, 03:52 PM
No i have changed nothing, if i look in the DB the tables are as you said they should be.

I need to have a look at your board - can you set me up an account with admin privs and PM them to me?

AndrewD
09-20-2004, 04:07 PM
Why does it show the source of the download when I set it to a remote site? (it doesn't show when the file is stored on the local website though)? And is there any way to fix this?

I need a bit more information - what type of file/do you have a mimetype set up for that type on your board admincp/have you set the links admin to use force_redirect?

Basically, this hack provides two ways of accessing downloads.
Either
- the file has a recognised mimetype and (you are running version 1.30 or less) or (you are running version 1.35 and force_redirect=0 on your admin page)
or
- one of those conditions does not apply.

In the first case, the download is handled on the server by successively reading then rewriting chuncks of data to the user.
In the second case, the download is handled by telling the client browser to redirect to the file.

The first hides the source, the second does not (and cannot).

???`S?LV?R???`
09-20-2004, 05:42 PM
I forgot to add the file type for it (mp3) but now that I have that setup, it's trying to display the mp3 in the browser (coding) instead of prompting for a download.....

I'm running 1.35
I have it set to force_redirect=0

???`S?LV?R???`
09-20-2004, 05:48 PM
nevermind i figured out how to fix this.... i had to set the content type on the mp3 to the same as that it has on zip, and now it's prompting for download instead of trying to display its coding in the browser....
thanks for the response though :)

Snatch
09-20-2004, 08:03 PM
I have one error. If a user post a link and i klick on moderate Links the link schows in on the Modpage. But if i klick in the link to moderate him i get this error.



Datenbankfehler in vBulletin 3.0.3:

Ungueltige SQL-Abfrage:
mysql error: Query was empty

mysql error number: 1065

Datum: 20.09.2004 22:57:57
Skript: http://www.celebritymarkt.de/local_links.php?action=modcat&catid=2
Referer: http://www.celebritymarkt.de/local_links.php?action=mod
Benutzername: Snatch
IP-Adresse: 213.23.58.128

sinclac
09-20-2004, 08:46 PM
I need to have a look at your board - can you set me up an account with admin privs and PM them to me?

I just PMed you

AndrewD
09-21-2004, 04:07 PM
I have one error. If a user post a link and i klick on moderate Links the link schows in on the Modpage. But if i klick in the link to moderate him i get this error.



Datenbankfehler in vBulletin 3.0.3:

Ungueltige SQL-Abfrage:
mysql error: Query was empty

mysql error number: 1065

Datum: 20.09.2004 22:57:57
Skript: http://www.celebritymarkt.de/local_links.php?action=modcat&catid=2
Referer: http://www.celebritymarkt.de/local_links.php?action=mod
Benutzername: Snatch
IP-Adresse: 213.23.58.128


Thanks for pointing this out - and sorry. There's a bug in local_links.php. Line 1225 in version 1.35 / line 1123 in version 1.30 reads:
list ($linklistbit, $nhits) = get_linklistbit($squery, "", 1, 999999, 1);

It should read
list ($linklistbit, $nhits) = get_linklistbit($query, "", 1, 999999, 1);

Spinball
09-24-2004, 06:32 AM
Excellent hack, thank you.
Can I please request an enhancement?
I want to list retailers on our site but it galls me somewhat that they will be getting free advertising.
I want to have 'premium' links which are displayed at the top and charge them for this service. I appreciate this might need a 'display order' field in the link table and admin page and the order sql will need the 'order by' bit changed. E.g. to order by displayorder ASC,title ASC etc
But I think being able to set a display order would be a useful feature.
I would, for example, set all normal links to a display order of 1 and all advertisers an order of 0 so the premium advertisers get listed alphabetically at the top.
It would also be great to be able to put a separator - just a small gap - between the premium links and the normal ones.
Is this something you'd be interested in adding do you think?

AndrewD
09-24-2004, 06:58 AM
Excellent hack, thank you.
Can I please request an enhancement?
I want to list retailers on our site but it galls me somewhat that they will be getting free advertising.
I want to have 'premium' links which are displayed at the top and charge them for this service. I appreciate this might need a 'display order' field in the link table and admin page and the order sql will need the 'order by' bit changed. E.g. to order by displayorder ASC,title ASC etc
But I think being able to set a display order would be a useful feature.
I would, for example, set all normal links to a display order of 1 and all advertisers an order of 0 so the premium advertisers get listed alphabetically at the top.
It would also be great to be able to put a separator - just a small gap - between the premium links and the normal ones.
Is this something you'd be interested in adding do you think?

Thanks for your kind remarks.

Indeed, others have asked for something similar, and it's quite easy to add. I'll hav a look this weekend.

Spinball
09-26-2004, 06:40 AM
Thanks, Andrew.
Had another idea. Our links resource relates to audio visual resources. It includes manufacturers, distributors and retailers of AV gear. Very occasionally these companies don't have a website. In addition the retailers - partiularly those who are paying for a premium listing - would value having their phone number up there.
Is it at all possible to include entries where the link isn't active (because very occasionally the organisation has gone bust or doesn't have a website) and include a separate optional column for a phone number?
Thanks

AndrewD
09-26-2004, 11:12 AM
Thanks, Andrew.
Had another idea. Our links resource relates to audio visual resources. It includes manufacturers, distributors and retailers of AV gear. Very occasionally these companies don't have a website. In addition the retailers - partiularly those who are paying for a premium listing - would value having their phone number up there.
Is it at all possible to include entries where the link isn't active (because very occasionally the organisation has gone bust or doesn't have a website) and include a separate optional column for a phone number?
Thanks

I think I'll give this suggestion a miss. You can achieve a similar effect by setting up a small web page ("this site is no longer active") and using that as the link for entries that do not have a working web site.

If you send me an email, I'll reply with the beta code for your previous suggestion - display order + separator bars. The display and database code is written but not the admin code to modify the display order, so you have to use phpmyadmin.

Spinball
09-26-2004, 11:28 AM
Email sent, thanks.

Spinball
09-27-2004, 06:28 PM
I have found a small bug.
In the admin page listing of duplicate links, the links to the categories read as, for example:
http://www.avforums.com/forums/local_links.php&catid=6
& instead of ?

AndrewD
09-28-2004, 04:30 AM
I have found a small bug.
In the admin page listing of duplicate links, the links to the categories read as, for example:
http://www.avforums.com/forums/local_links.php&catid=6
& instead of ?


yep! thanks

Spinball
09-28-2004, 11:41 AM
Andrew,
based on initial usage, I have another important feature request.
Some links might mistakenly be put into wrong categories. Or people might not know which to use. In addition, people might use inappropriate wording in links trying to spam people etc.
I think a category specific 'instructions' text field displayed when adding a link would be very useful.
In this field, one could enter specific instructions guiding people on how to enter new links and warning them not to abuse the system.
Hope you agree this would be useful.

AndrewD
09-28-2004, 03:35 PM
Andrew,
based on initial usage, I have another important feature request.
Some links might mistakenly be put into wrong categories. Or people might not know which to use. In addition, people might use inappropriate wording in links trying to spam people etc.
I think a category specific 'instructions' text field displayed when adding a link would be very useful.
In this field, one could enter specific instructions guiding people on how to enter new links and warning them not to abuse the system.
Hope you agree this would be useful.

This is straightforward but there's a slight complication. Even though one is already within a category when chosing "Add Link", the new link can be entered into multiple categories at the same time, and even perhaps not into the one that is current. This "instruction" field would clearly only relate to the current category. OK?

Spinball
09-28-2004, 03:52 PM
Yes that would be fine.
It's mainly to give guidance on what is and isn't allowed to be posted in the link description. Today we had a retailer post an essay on how great they were.
That's not appropriate, obviously.

joeychgo
09-29-2004, 09:01 AM
Andrew, I have a suggestion -

Many sites do recripocal links. Ettiquite is when requesting a link, you place the other site's link first, then request.

What I have always found troublesome is verifying that the recripocal link actually gets placed -

Is there a way you can incorporate a way to remind the site admin that they are waiting on a link so they know to check and make sure a link got placed?

AndrewD
09-29-2004, 03:31 PM
Andrew, I have a suggestion -

Many sites do recripocal links. Ettiquite is when requesting a link, you place the other site's link first, then request.

What I have always found troublesome is verifying that the recripocal link actually gets placed -

Is there a way you can incorporate a way to remind the site admin that they are waiting on a link so they know to check and make sure a link got placed?

I'll have a look - may take a while as I'm going to be travelling soon,

Spinball
10-03-2004, 10:15 AM
Bad timing, possibly. Something to think about, perhaps, while you are away.
How about a 'your favourites' category?
A category which is created by default upon installation with an admin option to use it or not. It's display order is at the top by default. (Which as an aside makes me think that maybe categories should have a display order also).
If enabled, every link in the database has an 'add to favourites' link which adds that link to the favourites list for that member. That link is then displayed in the 'your favourites' category.
Each link displayed in the 'your favourites' category has a 'remove from favourites' link against it for obvious reasons.

I thought that maybe this functionality is duplicating your browser favourites list, but the advantage in using the forum links database is that we validate the links regularly and maintain each user's list irrespective of which browser they use (some use several).

greywolff
10-04-2004, 09:36 PM
I am haveing one tiny problem

the hit counter is not working ? it stays at 0 ?

what did i miss ?

AndrewD
10-06-2004, 02:52 PM
I am haveing one tiny problem

the hit counter is not working ? it stays at 0 ?

what did i miss ?

I need a bit more information. I registered at your site and didn't see any hits counters displayed at all. Have you turned off the hits display using the links admin page? When you say the counter stays at 0, I assume that is what is being displayed - could you checked the database (table local_linkslink, column linkhits)? Have you edited the templates at all?

Blam Forumz
10-07-2004, 06:06 AM
You just got yourself an install ;)

Lionel
10-11-2004, 08:05 PM
I plan to add an "extended description" in the add_link. How would I go, if there are no links, instead of displaying the error to display that?

AndrewD
10-12-2004, 05:46 AM
I plan to add an "extended description" in the add_link. How would I go, if there are no links, instead of displaying the error to display that?

Sorry, I'm not sure I quite understand.

You want to add an extra field in the links table which contains extended text concerning the link?

And you want this field to be displayed if the link is missing/invalid/?

Adding an extra field to the database is quite easy - although you will mess up any upgrade path that I offer - but you will have to make quite a few changes to avoid the error checking for valid/invalid/missing links.

Maybe you could explain what you try to do - there may be an easier approach.

Lionel
10-12-2004, 12:39 PM
Thanks for your reply. I am using this to display references: pdf, mp3, external pages etc... and it is working great for me. I'd like to be able also to display biographies. For that I thought of using the description field only, but if there are nothing in the url field, I get an error message.

What would be awesome would have been for the description box to have the same features than vbulletin newpost.php with attachment etc... but I'll be content with the ability to bypass the url field.

Blam Forumz
10-12-2004, 02:32 PM
anyway to make user add files, but need an admin to validate them?

AndrewD
10-12-2004, 04:25 PM
anyway to make user add files, but need an admin to validate them?

Yep, you set these permissions on the links admin page:
- allow the appropriate user groups to create new links
- turn on moderation
- set the admin group as moderators

:)

AndrewD
10-12-2004, 04:25 PM
Thanks for your reply. I am using this to display references: pdf, mp3, external pages etc... and it is working great for me. I'd like to be able also to display biographies. For that I thought of using the description field only, but if there are nothing in the url field, I get an error message.

What would be awesome would have been for the description box to have the same features than vbulletin newpost.php with attachment etc... but I'll be content with the ability to bypass the url field.

I'll think about this.

Lionel
10-12-2004, 05:31 PM
I added the free editor from http://www.interactivetools.com/freescripts/
with which, with a couple of hacks provided there you can create template and make the contents display the way tou want it. BUT, how do I make description display html?

Lionel
10-12-2004, 09:12 PM
here is what I did so far:

I downloaded and installed the link above in less than 5 minutes.

Added a table below linkdesc table with same attributes and called it extendedlinkdesc

In the script, after every instance of linkdesc or $linkdesc, I added a similar line for extendedlinkdesc or $extendedlinkdesc

with conditionals, I made

a-the editor show only to certain usergroup
b-if condition $extended is not null then the link is different or, like in the thumb example, there is a ... more link.

I copied entire function if ($_REQUEST['action'] == "jump")

into

if ($_REQUEST['action'] == "extendedjump")

in order to create inhouse jumplink (the more link)

here is where I am fumbling

a-the extendedjump field does not display html
b-I'd like for the extended jump link to do an eval, call template extended jumlinkbit where all I would have in there will be $extendedlinkdesc, so it display within site template.

For the http:// error, we could tell the script that if http:// is empty, then to use my site url (it will not display anyway. That is just to trick the link check). Would be swell to limit that only if extendedlinkdesc is not empty (only admin and mod see it), in order to prevent people from posting blanks.

Blam Forumz
10-13-2004, 05:21 AM
Error when i update my links option (who can view, etc)

Warning: opendir(): open_basedir restriction in effect. File(/) is not within the allowed path(s): (/home/blamina/:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/blamina/public_html/forum/local_links.php on line 2630

Warning: opendir(/): failed to open dir: Operation not permitted in /home/blamina/public_html/forum/local_links.php on line 2630
The following setting(s) are invalid
file_icons_dir : /
Go back

Lionel
10-13-2004, 06:27 AM
I did a nice little addition to rating
below:

$linkrate = round($links_totrate[$linkid] / $links_numrate[$linkid]);

I added:

$thevote="<img src=\"images/rating/rating_$linkrate.gif\">";

and in template ratebit, I swapped $linkrate with $thevote. :squareeyed:

For the rate itself, I am planning to place the navbar type vote which opens with the stars

greywolff
10-14-2004, 04:31 AM
I need a bit more information. I registered at your site and didn't see any hits counters displayed at all. Have you turned off the hits display using the links admin page? When you say the counter stays at 0, I assume that is what is being displayed - could you checked the database (table local_linkslink, column linkhits)? Have you edited the templates at all?

ok i fixed the view on the links go look again sorry bout that forgot i had the hitson admin view only

Blam Forumz
10-14-2004, 08:47 PM
Error when i update my links option (who can view, etc)


Warning: opendir(): open_basedir restriction in effect. File(/) is not within the allowed path(s): (/home/blamina/:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/blamina/public_html/forum/local_links.php on line 2630

Warning: opendir(/): failed to open dir: Operation not permitted in /home/blamina/public_html/forum/local_links.php on line 2630
The following setting(s) are invalid
file_icons_dir : /
Go back
Bump :( Help

TheBurner
10-15-2004, 05:01 AM
Nice Work :up:

I have the MOD installed on my forum.

Is it posible to change the .xml file to dutch?

Yesterday I changed the text between the <br> and </br>
and I thought it would come on the forum in dutch.

No luck, it's still english...


What is the problem? Can anyone help me?

Sorry for my bad english.

AndrewD
10-15-2004, 05:03 AM
Nice Work :up:

I have the MOD installed on my forum.

Is it posible to change the .xml file to dutch?

Yesterday I changed the text between the <br> and </br>
and I thought it would come on the forum in dutch.

No luck, it's still english...


What is the problem? Can anyone help me?

Sorry for my bad english.

Certainly possible to change the xml. When you've done this, you need to re-run the install script, stage 2, to reinstall the templates.

I need to do a proper language pack job on this hack, but that was a low priority while things were still in development.

TheBurner
10-15-2004, 05:07 AM
Certainly possible to change the xml. When you've done this, you need to re-run the install script, stage 2, to reinstall the templates.

I need to do a proper language pack job on this hack, but that was a low priority while things were still in development.

Thanks :D

I'll try it out.

AndrewD
10-15-2004, 05:21 AM
Bump :( Help

As far as I understand, your site manager has restricted which parts of the local directory structure can be accessed by php scripts. open_basedir is set within php.ini (or perhaps within apache?) - check using phpinfo (VBulletin main admin page, Import and Maintenance).

But I see also that you are setting file_icons_dir to "/", so I presume you've dumped the icons into the main forums directory. Move them into a subdirectory, e.g. set file_icons_dir to (e.g.) local_icons/

Blam Forumz
10-15-2004, 03:37 PM
As far as I understand, your site manager has restricted which parts of the local directory structure can be accessed by php scripts. open_basedir is set within php.ini (or perhaps within apache?) - check using phpinfo (VBulletin main admin page, Import and Maintenance).

But I see also that you are setting file_icons_dir to "/", so I presume you've dumped the icons into the main forums directory. Move them into a subdirectory, e.g. set file_icons_dir to (e.g.) local_icons/
erm.. could you explain that in english please :(

Holidazed
10-15-2004, 03:46 PM
As far as I understand, your site manager has restricted which parts of the local directory structure can be accessed by php scripts. open_basedir is set within php.ini (or perhaps within apache?) - check using phpinfo (VBulletin main admin page, Import and Maintenance).

But I see also that you are setting file_icons_dir to "/", so I presume you've dumped the icons into the main forums directory. Move them into a subdirectory, e.g. set file_icons_dir to (e.g.) local_icons/I have no idea what this means. I do not have access to php.ini. I am getting a similar error.

Warning: opendir(): open_basedir restriction in effect. File(/forums/images/link-icons/) is not within the allowed path(s): (/path/to/my/lib/php:/usr/local/lib/php:/tmp) in /path/to/my/forums/local_links.php on line 2630

Warning: opendir(/pathtomy/forums/images/link-icons/): failed to open dir: Operation not permitted in /path/to/my/forums/local_links.php on line 2630
The following setting(s) are invalid
file_icons_dir : //forums/images/link-icons/


I put my icons under the /forums/images/link-icons directory. I have tried moving the images to a wide variety of locations and get the same error.

HELP!!

Lionel
10-15-2004, 04:05 PM
I'll think about this.

I managed to do all I wanted... If only you could tell me how to enable html, then I'll be done completely.

AndrewD
10-15-2004, 04:43 PM
I have no idea what this means. I do not have access to php.ini. I am getting a similar error.

Warning: opendir(): open_basedir restriction in effect. File(/forums/images/link-icons/) is not within the allowed path(s): (/path/to/my/lib/php:/usr/local/lib/php:/tmp) in /path/to/my/forums/local_links.php on line 2630

Warning: opendir(/pathtomy/forums/images/link-icons/): failed to open dir: Operation not permitted in /path/to/my/forums/local_links.php on line 2630
The following setting(s) are invalid
file_icons_dir : //forums/images/link-icons/


I put my icons under the /forums/images/link-icons directory. I have tried moving the images to a wide variety of locations and get the same error.

HELP!!

Sorry if my answer seemed like Greek. I think this is what is going on...

Your system manager has configured your account so that people like me can only write scripts that do a "directory listing" in certain places in the file system. Unfortunately, she has set it to forbid "directory listing" access to your web site directories. My script tries to read the icon directory a) to be sure that it exists at all, and b) to see which icons are there. Step a) fails because of this setting.

I'll fix the code to deal with this situation.

I realise on further thought that a full fix is probably not possible for sites that have set open_basedir. I can get round the error message by not doing the error checks - but this will only be satisfactory if you make sure that you enter a correct directory and if you ensure you provide icons for every file type that you make available for download. Otherwise the user will see missing images for downloadable files when the icon isnt available. Can you guarantee this?

AndrewD
10-15-2004, 04:43 PM
erm.. could you explain that in english please :(

See reply to bitg. Will try to provide a fix soon.

AndrewD
10-15-2004, 05:21 PM
I managed to do all I wanted... If only you could tell me how to enable html, then I'll be done completely.

In order to enable html, you need to remove calls to htmlspecialchars() in local_links.php. This function processes user input to turn html entries into escaped html entries.

So have a look in the insert_link code and in the do edit link code. You'll find that the database insert/update statements wrap several fields in a call to htmlspecialchars().

Holidazed
10-15-2004, 05:43 PM
OK, I got my problem resolved. I went into the control panel for that m host provides and turned on directory listing for that folder.

Thanks Andrew for the heads up on why it was failing.

Lionel
10-15-2004, 06:53 PM
Thank you Andrew :up:

AndrewD
10-16-2004, 12:34 PM
I did a nice little addition to rating
below:

$linkrate = round($links_totrate[$linkid] / $links_numrate[$linkid]);

I added:

$thevote="<img src=\"images/rating/rating_$linkrate.gif\">";

and in template ratebit, I swapped $linkrate with $thevote. :squareeyed:


Thanks Lionel

Those who do not like coding can achieve this just by editing the links_ratebit template<span class="smallfont"> <img src=images/rating/rating_$linkrate.gif> <if condition="$links_permissions[can_admin_links]"> <a href="local_links.php?action=doratelink&amp;vote=-1&amp;id=$linkid&amp;catid=$viewcatid&amp;page=$pagenumber">clear</a></if></span>

Blam Forumz
10-16-2004, 02:17 PM
See reply to bitg. Will try to provide a fix soon.
Thanks

Also, i got it to work by making it so it has the parent of a section on my forum ^^

hodur
10-17-2004, 04:59 PM
I have a error, when I want to moderate a link:
Datenbankfehler in vBulletin 3.0.3:

Ungueltige SQL-Abfrage:
mysql error: Query was empty

mysql error number: 1065

Datum: 17.10.2004 19:48:54
Skript: http://mysite.com/forum/local_links.php?action=modcat&catid=7
Referer: http://mysite.com/forum/local_links.php?action=mod
Benutzername: hodur
Any ideas?

AndrewD
10-17-2004, 07:31 PM
I have a error, when I want to moderate a link:

Any ideas?

Sorry, there's a bug in the uploaded version, see https://vborg.vbsupport.ru/showpost.php?p=554619&postcount=600 for the fix.

I forgot to upload the corrected version.

hodur
10-17-2004, 08:41 PM
Now ist works fine. :squareeyed:
Thanks.

AndrewD
10-18-2004, 06:15 PM
Version 1.35a now supported; version 1.41 beta; see first post of thread.

Reports please.

welo
10-18-2004, 06:28 PM
Looking pretty good, Andrew ;). I was going to wait until 1.35 went stable and use that, although I think it's a safe risk just to go ahead with 1.41b ;). Oh, and kudos on your superior documentation.

Lionel
10-18-2004, 09:47 PM
"added option to allow new links to have an empty link, i.e. just a name
and description"

Is that something that is typical with new beta or could that be achieved in 1.35?

Roms
10-19-2004, 02:24 AM
I like it, it was very user friendly to install. I customized it a little just to say "downloads".....

Thanks for the work.

*Clicks Install

AndrewD
10-19-2004, 03:32 AM
"added option to allow new links to have an empty link, i.e. just a name
and description"

Is that something that is typical with new beta or could that be achieved in 1.35?

It was added in 1.41, following your (and others) suggestion/request. Version 1.35 did not allow it. I have not included the other bits that you added, to provide the extended link description and wisiwig editor.

Lionel
10-19-2004, 03:38 AM
ouch, I did a lot of customization... I guess I will have to put in the same dummy url every time...

AndrewD
10-19-2004, 04:29 AM
ouch, I did a lot of customization... I guess I will have to put in the same dummy url every time...

This is a real problem for software that is still being developed - sorry!

SupraT
10-30-2004, 05:48 AM
I have the links installed on site. Works great, but one week after our relaunch I am noticing that downloaders are getting by the protection. It appears that they are getting the direct link from the window that pops up when you click the link. The one that states that you are being redirected. I have used this on other sites and it does not display the same way as it does on my site.

Am I missing something, or is install no good?

Please advice.

Thanks

AndrewD
10-31-2004, 06:22 AM
I have the links installed on site. Works great, but one week after our relaunch I am noticing that downloaders are getting by the protection. It appears that they are getting the direct link from the window that pops up when you click the link. The one that states that you are being redirected. I have used this on other sites and it does not display the same way as it does on my site.

Am I missing something, or is install no good?

Please advice.

Thanks

Sorry, I'm not sure I understand the problem - are your users getting a popup which tells them the location of the file, so they then know how to bypass the system?

Several questions:
- Are the downloads coming from your site or another? Normally, files with recognised mimetypes on your site should not produce this popup.
- Have you changed the setting of force_redirect on the links admin page - if this = 1 then your users will get to see the file locations
- Are you using the local_file_root setting on the links admin page to place the downloads outside the web directories, to prevent anyone from getting at them except through the links s/w?

If these suggestions don't help, pm me with more details of your site.

SupraT
10-31-2004, 03:20 PM
Sorry, I'm not sure I understand the problem - are your users getting a popup which tells them the location of the file, so they then know how to bypass the system?

Several questions:
- Are the downloads coming from your site or another? Normally, files with recognised mimetypes on your site should not produce this popup.
- Have you changed the setting of force_redirect on the links admin page - if this = 1 then your users will get to see the file locations
- Are you using the local_file_root setting on the links admin page to place the downloads outside the web directories, to prevent anyone from getting at them except through the links s/w?

If these suggestions don't help, pm me with more details of your site.
Easy way would be to check out the downloads on my site: http://www.clanspy.net/forum/local_links.php?

I do not see the setting force_redirect, maybe this isn't the same hack??? I didn't install it and was told this was it :(

The files are on the local server and inside the web directories.

Thanks for your help.

AndrewD
10-31-2004, 03:42 PM
Easy way would be to check out the downloads on my site: http://www.clanspy.net/forum/local_links.php?

I do not see the setting force_redirect, maybe this isn't the same hack??? I didn't install it and was told this was it :(

The files are on the local server and inside the web directories.

Thanks for your help.

It's the same hack - you are using an old version (1.21) in which the force_redirect setting did not exist - but that should not affect things.

Looking at your site, I can see a set of links that are available without logging in. If you want to stop these being copied by unregistered users (via the links hack or by using the redirection), then:
- associate each link with a VBulletin forum
- set that forum's permissions so it is only accessible to the usergroups you want

SupraT
10-31-2004, 05:05 PM
Would it be advisable to upgrade to the more recent version? If so, is it simply re-editing the files per the instructions?

AndrewD
11-01-2004, 04:08 AM
Would it be advisable to upgrade to the more recent version? If so, is it simply re-editing the files per the instructions?

I think it's a good idea to upgrade, but this has nothing to do with the problem you report.

To upgrade, you upload the latest files (local_links.php and local_links_templates.xml into you main forums dir) and local_links_install.php into your admin dir, and rerun the installation script.

SupraT
11-01-2004, 05:34 AM
I think it's a good idea to upgrade, but this has nothing to do with the problem you report.

To upgrade, you upload the latest files (local_links.php and local_links_templates.xml into you main forums dir) and local_links_install.php into your admin dir, and rerun the installation script.
OK I did the upgrade, however, as you have stated it has not changed the problem. Did you try the download? See how a window opens in the back ground that states you are being redirected, then the SAVE AS window appears. Well the pop-up window in background is still there and if you highlight the :forward to link" you see the URL.

How do I stop that?

AndrewD
11-01-2004, 08:46 AM
OK I did the upgrade, however, as you have stated it has not changed the problem. Did you try the download? See how a window opens in the back ground that states you are being redirected, then the SAVE AS window appears. Well the pop-up window in background is still there and if you highlight the :forward to link" you see the URL.

How do I stop that?

I see that you're offering rather large zips and exes. Downloads with recognised mimetypes are handled differently than downloads with unrecognised memetypes, where the redirection window is used. Does your VB main admin have mime settings for zip and exe?

Go to VB's main admin, then attachment, then extensions and sizes. The appropriate mimetype for a zip file is Content-type: application/zip. For an executable, you can just create the exe attachment type and leave the mimetype field empty.

Normally, when the file has a recognised mimetype, the download is handled transparently, so the user does not get to see where the file is stored.

*But* a big warning - if you choose this route, you are increasing the cpu load on your server. This is normally only a problem if the files are held on a third party machine, because then your server has to keep reading, then rewriting records. This is why I added the force_redirect switch on the links admin page, to force the hack always to use redirection rather than read/rewrite to user.

The link on the redirection window ("click here if you do not get redirected") is being created within the standard VB code. There may be a way to suppress it, but I'm not sure.

SandsUSA
11-02-2004, 02:43 PM
@AndrewD ~ I've been using this hack since it was first released and just wanted to re-affirm: Thanks, great hack and support.

welo
11-02-2004, 04:06 PM
I'll second that. I haven't installed the latest version yet although I intend to this week. This is definitely one of the better supported and developed hacks around here.

Natch
11-04-2004, 12:45 AM
*nods* Thumbs-up AndrewD

Ranma2k
11-05-2004, 11:56 AM
Hi AndrewD
Thaks alot of the script i still use it since ver 1 :)
i wanted to ask you something

In my site i add the download files in a diffrent server & on that server i enabled the hotlinking protection even for direct request
the only way to download is if the refferal for the download is comming from my site

is there a way to add a specific refferal Url in the script so it send it with the link while the force redirection option is on ?! or even while the force redirection is off ?!

another thing is
is it posible that the owner of the link ( the one who adds the link ) can edit his links only meaning he can't edit links added by other people?!
cuz if i give the people permission to edit thier links they can edit other people links and i don't want that !

dlouly47
11-08-2004, 07:10 AM
I just downloaded this and installed it, however in step one It failed and gives me the error from mysql stating the table does not support full text indexes? How do I fix this

Ranma2k
11-08-2004, 10:04 AM
I just downloaded this and installed it, however in step one It failed and gives me the error from mysql stating the table does not support full text indices? How do I fix this?


what ver is your Mysql ?! ( the script requires MySql 4.0+ )

dlouly47
11-08-2004, 04:09 PM
Hi Ranam2k,

Its Version 4.1

dlouly47
11-08-2004, 05:01 PM
Ah.. All resolved !! I did the fix last nite but did not reboot. I just had to change the filesystem type to myisam.. rebooted this morning and whala..

Thanks guys !!

AndrewD
11-09-2004, 04:06 PM
Hi AndrewD
Thaks alot of the script i still use it since ver 1 :)
i wanted to ask you something

In my site i add the download files in a diffrent server & on that server i enabled the hotlinking protection even for direct request
the only way to download is if the refferal for the download is comming from my site

is there a way to add a specific refferal Url in the script so it send it with the link while the force redirection option is on ?! or even while the force redirection is off ?!

another thing is
is it posible that the owner of the link ( the one who adds the link ) can edit his links only meaning he can't edit links added by other people?!
cuz if i give the people permission to edit thier links they can edit other people links and i don't want that !

Hi, thanks.

I'll have to think about the first question.

For the second, the owner of the link should always be able to edit his/her own links, regardless of the settings you make on the admin page. (If not, something's broken!) Let me know if that's not the case.

Cent
11-09-2004, 04:16 PM
How can I make, that who adds the link, wrote the E-mail? That on a mail the letter was sent it, that the reference has been added in the catalogue! Sorry for my English!

dlouly47
11-09-2004, 10:10 PM
Ok Got it up however when I or users try to download , its starts fine but then closes in about 20 seconds? Cuts the file download short? It must be settings in my PHP.INI? Please let me know how to adjust this ..

Thanks again for the wonderful work

AndrewD
11-10-2004, 10:43 AM
Ok Got it up however when I or users try to download , its starts fine but then closes in about 20 seconds? Cuts the file download short? It must be settings in my PHP.INI? Please let me know how to adjust this ..

Thanks again for the wonderful work

If it's your php.ini settings, try looking at the section



;;;;;;;;;;;;;;;;;;;
; Resource Limits ;
;;;;;;;;;;;;;;;;;;;

max_execution_time = 30 ; Maximum execution time of each script, in seconds
max_input_time = 60 ; Maximum amount of time each script may spend parsing request data
memory_limit = 8M ; Maximum amount of memory a script may consume (8MB)

Cent
11-10-2004, 10:54 AM
Hey AndrewD! HELP PLEASE!!!

How can I make, that who adds the link, wrote the E-mail? That on a mail the letter was sent it, that the reference has been added in the catalogue! Sorry for my English!

AndrewD
11-10-2004, 11:33 AM
Hi AndrewD
Thaks alot of the script i still use it since ver 1 :)
i wanted to ask you something

In my site i add the download files in a diffrent server & on that server i enabled the hotlinking protection even for direct request
the only way to download is if the refferal for the download is comming from my site

is there a way to add a specific refferal Url in the script so it send it with the link while the force redirection option is on ?! or even while the force redirection is off ?!



Thinking about this (but without spending time trying it out ;))...

If force_redirect is off, etc, the download is handled as a series of reads/writes. The code uses an fopen() call to access the download file, and this turns into an HTTP GET. My Apache log shows that this GET is recorded against the IP address of the requesting server, so your file host should be able to see that the request is legitimate.

If force_redirect is on, then the code eventually drops through to the STANDARD_REDIRECT template within Vbulletin. This sends a series of HTTP headers to the file host, and I would think you could add an HTTP_REFERER.

AndrewD
11-10-2004, 11:35 AM
Hey AndrewD! HELP PLEASE!!!

How can I make, that who adds the link, wrote the E-mail? That on a mail the letter was sent it, that the reference has been added in the catalogue! Sorry for my English!

Hi Cent. Sorry, I'm not quite sure I understand what you're asking.

Do you want the hack to send an email to the person who creates a new link when that link is accepted by the moderator?

Let me know, and I'll try to help.

dlouly47
11-10-2004, 05:45 PM
If it's your php.ini settings, try looking at the section



;;;;;;;;;;;;;;;;;;;
; Resource Limits ;
;;;;;;;;;;;;;;;;;;;

max_execution_time = 30 ; Maximum execution time of each script, in seconds
max_input_time = 60 ; Maximum amount of time each script may spend parsing request data
memory_limit = 8M ; Maximum amount of memory a script may consume (8MB)


Thanks Andrew... I actually thought that was it and I replaced the Values to
-----------------------------------------------------
max_execution_time = 0 ; Maximum execution time of each script, in seconds
max_input_time = 0 ; Maximum amount of time each script may spend parsing request data
----------------------------------
As well as used set_timeout = 0 on top of the php.ini

and it works like a charm.. Again.. Thank you for the hack and the support.. Awesome man!@

Cent
11-10-2004, 09:28 PM
Do you want the hack to send an email to the person who creates a new link when that link is accepted by the moderator?

Yes! But not "when that link is accepted by the moderator". I don`t moderete the new links. =)

I want, that after the adding a new link, mail was sent to person who creates a new link. WOW! +)

Sorrrrry for my English! ;)

Ranma2k
11-10-2004, 11:51 PM
Yes! But not "when that link is accepted by the moderator". I don`t moderete the new links. =)

I want, that after the adding a new link, mail was sent to person who creates a new link. WOW! +)

Sorrrrry for my English! ;)


Please chose one of the following :
*if a person adds a link the system will send an e-mail to him conforming that it was added ?!
*if a person adds a link the system will send an e-mail to the people subscriped to it !
* if a person ads a link the system will e-mail the admin about it !


i'm out of options :)

Ranma2k
11-10-2004, 11:53 PM
Thinking about this (but without spending time trying it out ;))...

If force_redirect is off, etc, the download is handled as a series of reads/writes. The code uses an fopen() call to access the download file, and this turns into an HTTP GET. My Apache log shows that this GET is recorded against the IP address of the requesting server, so your file host should be able to see that the request is legitimate.

If force_redirect is on, then the code eventually drops through to the STANDARD_REDIRECT template within Vbulletin. This sends a series of HTTP headers to the file host, and I would think you could add an HTTP_REFERER.


i C
i'll give it a try .. and i'll post the results here :)

Cent
11-11-2004, 08:09 AM
*if a person adds a link the system will send an e-mail to him conforming that it was added ?!

:) Thanks!

AndrewD
11-11-2004, 09:39 AM
:) Thanks!

OK, now I understand.

But I don't understand why this is needed. When someone adds a link (without moderation), they immediately see that it's there? How will this extension help? What am I missing? Thanks,

Stormwolf
11-11-2004, 11:32 AM
Does this track who clicked on a link?

Like if I wanted to see by forum username how many times the link was clicked and who clicked on it.

AndrewD
11-11-2004, 11:43 AM
Does this track who clicked on a link?

Like if I wanted to see by forum username how many times the link was clicked and who clicked on it.

Yes, the admin can get a summary of all hits. There are no options for sorting, etc, unless you write a piece of code to process the downloads table in the database

Cent
11-11-2004, 01:09 PM
But I don't understand why this is needed. When someone adds a link (without moderation), they immediately see that it's there? How will this extension help? What am I missing? Thanks,
For me links are added by guests.

AndrewD
11-11-2004, 01:59 PM
For me links are added by guests.

OK, I'll include this on the list for the next version. Give me a few days ;)

Any more urgent (simple to implement) wishes, anyone?

Cent
11-11-2004, 05:26 PM
OK, I'll include this on the list for the next version. Give me a few days

BIG THANKS! SPASIBO FROM RUSSIA! +)

Ranma2k
11-11-2004, 10:34 PM
OK, I'll include this on the list for the next version. Give me a few days ;)

Any more urgent (simple to implement) wishes, anyone?


how about a user can register to a catagory and recive an e-mail when it's updated :)
also if it's posible more detail about the links / files ( when you click on it b4 redirect )

For example :
link/file Name
Author Name
Remote Filesize if it's a file
File Type if it's a file
# Views
# Downloads
Discussion can specify a link in a forum :)
Date Submitted
Rating ( members can rate it
Notify me of any updates on this file ( member can registre to get notified as i said i the top )


Oh my i got carried away :speechless:

AndrewD
11-13-2004, 08:19 AM
how about ...

So, you want that:

- A user can register to a category and receive e-mail when something is added/updated
- A user can register to be notified of any updates on this file

Taking these plus Cent's request suggests three levels of request
- email me whenever there's a new link I'm allowed to access (including one I create myself)
- email me on any new link in this category that I'm allowed to access
- email me whenever a link/file I've accessed is edited

A change in file size would also trigger the last case (but isn't always possible, e.g. for remote, non-mimetype files)

Cent want this to work for unregistered guest visitors, so the code will have to ask if necessary for an email address

- More detail about the links / files

link/file Name - this is currently hidden to stop leaching, but I suppose there's no harm in a pop-up giving just the local file name, stripped of any directory/web info
Author Name - Already available, just not shown in the template, so easy to add

Remote Filesize if it's a file - Already available for files with recognised mimetype *after * first download. Not possible for remote files accessed using redirects
File Type if it's a file - Already available using the file_icons_dir setting on the admin page (see documentation)

# Views - not sure what you mean

# Downloads - already visible to usergroups with can_view_hits permission, set on admin page

Date Submitted - already there!

Rating ( members can rate it ) - already there, provided you turn on can_rate_link on admin page

- Discussion can specify a link in a forum

I've thought about this for quite a while. The clean way to do this would be to use the forum parent which is used to set the link's access permissions also as the discussion forum for the link. The first time someone tried to discuss a link, a new thread would be created in that forum. The first post in the thread would be a summary of the link. Subsequently, people would simply be taken to that thread.

- Better admin summaries of who has accessed/downloaded what.

Currently, this is just a long list, ordered by date, with an optional start and end date which can be specified on hard-coded links but are not selectable within the admin template

Thoughts, anyone?

Ranma2k
11-13-2004, 02:14 PM
well what i mean is
when you click on a link it will open a page with all the information i just listed
in it
and in that information a button that will redirect him to the link ..

so the user can read the file details and then if he wants click on download button to continue with the download.


# Views - not sure what you mean

I mean number of people viewed this link either clicked on it or didn't click on it


Also i have another thing if it's posible
in the information page insted of showing the download link it will show an agreement if hte user agrees it will take him to the file otherwise it will redirect him to the site / forum / or what ever

restless
11-16-2004, 08:10 AM
while this is indeed a great hack, i would like to reiterate was is probably beating a dead horse...

this addition has nothing to do with a files database. it's links. the name is misleading.

i wish someone would do an addon to this hack that includes an uploader.

AndrewD
11-16-2004, 08:20 AM
while this is indeed a great hack, i would like to reiterate was is probably beating a dead horse...

this addition has nothing to do with a files database. it's links. the name is misleading.

i wish someone would do an addon to this hack that includes an uploader.

Sorry that you feel this way - I am clearly doing something wrong in offering our members access to several hundred files by using this hack! I think that the only possible confusion is that the "files" are not stored in the database, only the location of the files. Storing lots of files in a database is generally not good practice anyway because of the size problems.

An uploader is deliberately not part of the hack, as I did not want to get into all the issues of security management that it will create. There is plenty of software available to handle secure file uploading into web site directories, or into secure directories outside the web structure. Of course, there's nothing to stop anyone providing a separate hack to achieve this, but I want to resist any extensions *to this hack*.

restless
11-16-2004, 05:47 PM
don't get me wrong.. i think your hack is great and i'm sure i'll end up clicking install and using it. i'm just not sure for what at this point.

jugo
11-17-2004, 07:27 PM
Well...

I love this hack. so there!!

Now for the upload, I'm going to make me alittle something something using the httpupload hack.

I've used that for sig uploads and a couple of other things, why not this. I'll let you know what I come up with.

jugo out

LMAO...Who says that!?!?!?

restless
11-18-2004, 12:52 AM
i'm sorry if this was already covered in another post, but.....

is there any way to tell who added the link? i hate everything being so anonymous.

other than that.. i've managed a configuration. i wish i could do coding to get it to do what i want... (have an uploader on the add page that automatically places the link in the text box after uploading.)

spence2
11-18-2004, 11:54 PM
OK, I'll include this on the list for the next version. Give me a few days ;)

Any more urgent (simple to implement) wishes, anyone?

Yes, it would be great to be able to display the username of the person who added the link.

Thanks

AndrewD
11-20-2004, 09:18 AM
Yes, it would be great to be able to display the username of the person who added the link.

I'm rather busy, so the next release will be a couple of weeks still.

In the meantime, those who want to display submitting username might try this. Just replace the links_linkbit template with the attached. Please let me know if this is what you're wanting, or if Ive got the wrong message.

The submitting username and #hits are only visible to usergroups which you give can_view_hits privilege (see links admin page)

fortnox
11-22-2004, 08:40 PM
Hi!

First thanks for this great Hack.

I have a little Problem.

I can not set usergroup Permissions.Always when i give the permissions and click to "go" i become this on a new site :surprised: :

The following setting(s) are invalid
file_icons_dir : /
Go back


Can me anybody help please?

Bhuwan
11-22-2004, 08:43 PM
i am using it as a download system. iuploaded a 20 mb file and when i go to download it only 2.35 MB is downloaded.

fortnox
11-22-2004, 10:47 PM
Sorry i found what i`ve maked false. :rolleyes:

Great Hack!!

*clicks Install

restless
11-23-2004, 02:47 AM
excellent!

I'm rather busy, so the next release will be a couple of weeks still.

In the meantime, those who want to display submitting username might try this. Just replace the links_linkbit template with the attached. Please let me know if this is what you're wanting, or if Ive got the wrong message.

The submitting username and #hits are only visible to usergroups which you give can_view_hits privilege (see links admin page)

ericgtr
11-23-2004, 04:24 PM
excellent!
This is a well documented, great mod but I want to make sure I am not missing something here, is there a way to have it display all the attached files from a specific forum?

AndrewD
11-23-2004, 04:31 PM
i am using it as a download system. iuploaded a 20 mb file and when i go to download it only 2.35 MB is downloaded.

You are probably exceeding the CPU time limit allowed for php scripts. If you're controlling your own site, this is set in php.ini. Also, the script handles large files much quicker if you set force_redirect on the links admin page, but then the location of the file on your site will become visible.

AndrewD
11-23-2004, 04:32 PM
This is a well documented, great mod but I want to make sure I am not missing something here, is there a way to have it display all the attached files from a specific forum?
Yes I think I coded this inb, but I need to get home to remind myself! Will post an answer tomorrow.

ericgtr
11-23-2004, 04:35 PM
Yes I think I coded this inb, but I need to get home to remind myself! Will post an answer tomorrow.
Great, thanks! Just so I am making myself clear, that would be existing files from a forum, right?

AndrewD
11-24-2004, 04:07 AM
Great, thanks! Just so I am making myself clear, that would be existing files from a forum, right?

OK, I think we're talking at cross purposes. (1) Do you want to be able to find all the regular VBulletin attachments in a forum? Or (2) do you want to find all the files mentioned in a forum using the URL bbcode? Or (3) do you want to find all the files that have been set up using this hack which are associated with a particular forum?

This hack current will handle the third (although I think I found a bug). There's another hack somewhere that deals with the first. And I wrote some code, but haven't released it yet, that handles the second.

AndrewD
11-24-2004, 04:13 AM
Continuing the previous post, to handle case (3), i.e. to list all the links set up using this hack which were associated with forum X, use the following URL:

local_links.php?action=show&forum=X

Natch
11-24-2004, 09:31 PM
Clairification: will this above bit of code list files in this forum and child forums, or just this forumid?

AndrewD
11-25-2004, 03:00 AM
Clairification: will this above bit of code list files in this forum and child forums, or just this forumid?

Natch, currently, this gives purely the links/files which have the given forumid associated with them - recall that this is primarily the mechanism for controlling access permissions.

Do I get the sense that people want this hack to automatically gather files/attachments from forums and set up the appropriate entries in the links database? Do-able (but not this weekend)..

Natch
11-25-2004, 08:39 AM
Wow: that would be very cool, but I wouldn't want it to duplicate the file: only to create the link to it...

Thanks for the cla rification...

ogetbilo
11-25-2004, 09:53 AM
Andrew I have a question ? Is it possible for the script to get all files from a specific folder ?
For example me and all my buddies are uploading our files to www.yourforum.com/download Is it possible to add a script so links database will directly get the link and add it ? We are uploading nearly 50-60 different files everyweek and adding each of them one by one is pretty hard.

AndrewD
11-26-2004, 09:31 AM
Andrew I have a question ? Is it possible for the script to get all files from a specific folder ?
For example me and all my buddies are uploading our files to www.yourforum.com/download Is it possible to add a script so links database will directly get the link and add it ? We are uploading nearly 50-60 different files everyweek and adding each of them one by one is pretty hard.

Yes, I've written the script for this at home but had not released it. I'll include this - and related - features in the next revision.

NightWalk8r
11-27-2004, 09:46 PM
The following setting(s) are invalid
file_icons_dir : /

wasnt this optional?? why cant i leave it blank?? o_O
PLEASE HELP
TIA =)

AndrewD
11-28-2004, 04:46 AM
wasnt this optional?? why cant i leave it blank?? o_O
PLEASE HELP
TIA =)

It is optional and you should be able to leave it blank. Either you accidentally typed something else, or there's something about file and directory permissions that I've overlooked.

Can you
a) PM me the output from a phpinfo() (normal vb admincp, down the bottom in the maintenance section). In particular the setting of open_basedir is important.
b) Try setting this to a valid directory, e.g. admincp. It won't cause any difficulties because there are no icons there.
c) If all fails and this error message is a problem to you - actually it shouldn't matter because all that will happen is that no icons appear - find the following code (line 2880 in release 1.41):


if ($handle = @opendir($newsetting)) {
closedir($handle);
} else {
$error = 1;
}


and simply comment out the $error = 1 line (put // at the start of the line).

Please let me know what you find.

Jason McConnell
11-28-2004, 06:35 PM
Awesome hack!! Installed very easily :D

I have one question though, whenever someone's in the links directory, they appear in WOL as Unkown Location. I'm sure this has been addressed, but I've just spent the better part of almost two days searching for this and can't find an answer. Anyone got any idea how to fix this?

welo
11-28-2004, 07:31 PM
For Who's online: Install this hack (https://vborg.vbsupport.ru/showthread.php?t=66569) (or use this (https://vborg.vbsupport.ru/showpost.php?p=521347&postcount=138))

Jason McConnell
11-28-2004, 07:41 PM
Thanks! :D

NightWalk8r
11-28-2004, 08:09 PM
hey, Andrew.......i commented out the line and it's working now =D
thank you so much =)

AndrewD
11-29-2004, 05:01 AM
Awesome hack!! Installed very easily :D

I have one question though, whenever someone's in the links directory, they appear in WOL as Unkown Location. I'm sure this has been addressed, but I've just spent the better part of almost two days searching for this and can't find an answer. Anyone got any idea how to fix this?

Thanks. The "who's online" question is explained (I hope!) in the instructions file, see section 3.4 (d). Let me know if this works correctly.

Jason McConnell
11-29-2004, 06:09 AM
Thanks. The "who's online" question is explained (I hope!) in the instructions file, see section 3.4 (d). Let me know if this works correctly.

Thanks, I missed that the first time reading the instructions over. This hack kicks some ass man :D

*EDIT* Works just fine :)

Pixelgrounds
11-29-2004, 11:14 PM
Would someone be kind enough to repackage this hack for 3.0.3 with all the fixes that have been made thoughout this thread.

AndrewD
11-30-2004, 12:26 AM
Would someone be kind enough to repackage this hack for 3.0.3 with all the fixes that have been made thoughout this thread.

Not sure what you mean - it's been kept fully up to date and runs correctly on 3.0.3. We are currently adding the feaatures requested in the last few posts.

aussiev8
12-06-2004, 05:08 AM
**EDIT**

removed post!

AndrewD
12-07-2004, 02:00 PM
when will the next update be avaliable, there are some security issues that i've mentioned to andrewD around 2 weeks ago and nothing has been done to update!
The next update, m8, will be after I've finished burying a relative, who has just died!

Hang in there.

welo
12-07-2004, 04:35 PM
Aww, Andrew... My deepest condolences :(.

aussiev8
12-08-2004, 08:33 AM
i didn't know andrew, my apologies.

CSS59
12-12-2004, 05:21 AM
how long does it take to install this. Any live demos from anyone?

Sadie Frost
12-12-2004, 05:41 AM
how long does it take to install this. Any live demos from anyone?
It doesn't take very long - 5 minutes or so. I have it here http://buffy-boards.com/local_links.php

:)

Spinball
12-12-2004, 06:27 AM
how long does it take to install this. Any live demos from anyone?

Agree with Sadie - just a few minutes. Mine is at
http://www.avforums.com/links/

AndrewD
12-12-2004, 10:53 AM
i didn't know andrew, my apologies.

Back in circulation. Aussiev8, please pm me with your email address, so that I can send you a beta upgrade for testing.

CSS59
12-12-2004, 09:07 PM
thank you for the examples.

How do members subbmit a link? I want to use this for a link swap.
Any way to track links in/out?

steven s
12-13-2004, 12:10 AM
Error when i update my links option (who can view, etc)


Warning: opendir(): open_basedir restriction in effect. File(/) is not within the allowed path(s): (/home/blamina/:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/blamina/public_html/forum/local_links.php on line 2630

Warning: opendir(/): failed to open dir: Operation not permitted in /home/blamina/public_html/forum/local_links.php on line 2630
The following setting(s) are invalid
file_icons_dir : /
Go back

I had the same problem.
I went to install 1.41 and got a warning message.
I went ahead with the install anyway and now no longer have that warning message.

AndrewD
12-13-2004, 03:52 AM
I had the same problem.
I went to install 1.41 and got a warning message.
I went ahead with the install anyway and now no longer have that warning message.

Several of you have reported this problem, which is discussed in the documentation. Basically, your site's php installation has restrictions on which parts of the directory structure can be accessed by a php script. (This is the open_basedir setting in php.ini.) This error message is a consequence of that restriction. The next version will trap the message. It's nothing to worry about.

CSS59
12-13-2004, 04:33 AM
is this normal as well?

Warning ==========================
open_basedir is set to /home/jonelz:/usr/lib/php:/usr/local/lib/php:/tmp in your PHP installation
Please refer to the hack instructions for information on this setting
========================== Warning


and then I get this when I try to save settings:

The following setting(s) are invalid
file_icons_dir : /
Go back

Another setting that causes difficulties is *open_basedir*. If set, this
defines whereabouts in the directory tree files/directories can be opened
by php scripts. This causes problems in two situations:
a) if you offer file downloads and store these within a restricted part
of the directory tree; b) if you use the *file_icons_dir* facility to
add illustrative icons to downloads. The install script will warn you;
the workarounds are i) modify the setting of open_basedir;
ii) for case (a), use *local_file_root* setting to locate file
downloads in an accessible part of the directory tree;
iii) for case (b) point *file_icons_dir* at an accessible part of
the directory tree - otherwise, the hack will simply ignore the request
to display file icons.

I dont want to upload files but it wont let me save my admin settings cuz i keep getting that error and I really donno what to do


Help :(

AndrewD
12-13-2004, 12:06 PM
is this normal as well?

Warning ==========================
open_basedir is set to /home/jonelz:/usr/lib/php:/usr/local/lib/php:/tmp in your PHP installation
Please refer to the hack instructions for information on this setting
========================== Warning


and then I get this when I try to save settings:

The following setting(s) are invalid
file_icons_dir : /
Go back



I dont want to upload files but it wont let me save my admin settings cuz i keep getting that error and I really donno what to do


Help :(

Have a look at my reply (above) to NightWalker on 28-11-2004, 08:46. That tells you how to get rid of this error.

CSS59
12-13-2004, 01:51 PM
Thank you, this fixed it:

b) Try setting this to a valid directory, e.g. admincp. It won't cause any difficulties because there are no icons there.


Now how can I make a custom field for "where can we find a link on your site?"

AndrewD
12-13-2004, 01:56 PM
Thank you, this fixed it:




Now how can I make a custom field for "where can we find a link on your site?"

Sorry, you'll have to sort that out for yourself. I do the reasonable work for free, but also need to live a life.

CSS59
12-13-2004, 05:04 PM
Sorry, you'll have to sort that out for yourself. I do the reasonable work for free, but also need to live a life.


I understand. Thank you for the help.

Anyone want to do this Reciprocal Link's URL field? I really dont know how, I am an accountant :lol:

ZnARk
12-15-2004, 03:07 PM
First i want to say thanks for a great hack :)

I just wonder about one thing...
Is it possible to restrict the ability to add links in a certain category to just one usergroup without restricting viewing by the other groups?

I tried use the forumpermission function but it just seems just to restrict viewing permissions.

AndrewD
12-15-2004, 03:17 PM
First i want to say thanks for a great hack :)

I just wonder about one thing...
Is it possible to restrict the ability to add links in a certain category to just one usergroup without restricting viewing by the other groups?

I tried use the forumpermission function but it just seems just to restrict viewing permissions.

You can restrict which usergroups can add links to any category using the admin page. You restrict which user(s)(groups) can see a category or a link using the forum permissions. But you can't have different "adding" privileges for different categories.

Spinball
12-15-2004, 03:35 PM
Hi Andrew, hope you are well.
A couple of suggestions I hope might be of interest.
Firstly would it be possible to make rating links optional by forum?
We have a retailers forum and it is open to abuse by competitors leaving low ratings. I would like to disable ratings in this forum.
Secondly I re-submit the idea of being able to add links to a favourites category.
The Favourites category would contain user-specific links and appear in the same way as other categories. It would just contain duplicates of selected favourite links in the other categories.

AndrewD
12-16-2004, 10:06 AM
Hi Andrew, hope you are well.
A couple of suggestions I hope might be of interest.
Firstly would it be possible to make rating links optional by forum?
We have a retailers forum and it is open to abuse by competitors leaving low ratings. I would like to disable ratings in this forum.
Secondly I re-submit the idea of being able to add links to a favourites category.
The Favourites category would contain user-specific links and appear in the same way as other categories. It would just contain duplicates of selected favourite links in the other categories.

I'm in the middle of a whole set up improvements, so will see if these can be fitted in. I hadn't forgotten the "favourites" request.

Sovereign
12-16-2004, 11:21 PM
*Sovereign clicks install* Just what I needed, but I'm getting this error...(I think it's an error anyway...see pic)

AndrewD
12-17-2004, 05:38 AM
*Sovereign clicks install* Just what I needed, but I'm getting this error...(I think it's an error anyway...see pic)

No, that's a standard value - categories/links can be sub-grouped within their parent. By default this does not happen. This setting just controls the default subgrouping.

Tbird66
12-17-2004, 11:18 PM
I have a couple of issues with my install:

1. From instructions.txt:

b. Unzip the files somewhere convenient. The templates and natch
subdirectories are for convenience only. You don't need these.

c. Upload local_links.php, local_links_template.xml and get_hotlinks.php
into your *main forum* directory

The only copy I could find of get_hotlinks.php was in the natch subdirectory. The other 2 files were in the root of the unzipped folder. Did I use the correct file?

2. I receive the following error while creating tables:

Database error in vBulletin 3.0.3:

Invalid SQL:
CREATE TABLE IF NOT EXISTS local_linkslink (
linkid int(11) NOT NULL auto_increment,
linkname varchar(255) NOT NULL,
linkdesc text NOT NULL,
linkurl text NOT NULL,
linkhits mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
linkforum smallint(5) NOT NULL,
linkcheck int(10) unsigned NOT NULL,
linkstatus int(10) DEFAULT '0' NOT NULL,
linkdate int(10) NOT NULL,
linkusername text NOT NULL,
linkuserid int(10) NOT NULL,
linkmoderate int(2) NOT NULL,
linkmoddate int(10) DEFAULT '0' NOT NULL,
linkreviewfreq smallint(5) DEFAULT '0' NOT NULL,
PRIMARY KEY (linkid),
FULLTEXT KEY namedesc (linkname,linkdesc)
)

mysql error: The used table type doesn't support FULLTEXT indexes

mysql error number: 1214

I can create the table using Execute SQL Query in AdminCP and putting the qualifier ENGINE = MYISAM; at the end of the CREATE() statement, but then when I re-run local_links_install.php it does not see the table (I can successfully execute a SELECT * FROM local_linkslink query). I've tried skipping the table verification step, but I receive array errors in step 3.

I'm running MySQL 4.1.7 with both MyISAM and InnoDB storage engines enabled. As I'm running on Windows, the InnoDB storage engine is the default instead of MyISAM. InnoDB doesn't support FULLTEXT indexes, thus the need for the qualifier ENGINE = MYISAM;

Any suggestions?

Thanks!

Sovereign
12-18-2004, 02:22 AM
No, I meant the part circled in red. The default_cat_dseq. As in what appears to be a mssing variable in the language system (tried searching phrases for that, no luck)

AndrewD
12-18-2004, 08:57 AM
No, I meant the part circled in red. The default_cat_dseq. As in what appears to be a mssing variable in the language system (tried searching phrases for that, no luck)

Sorry, one of us is confused ;) default_cat_dseq is the name I have given to one of the settings used by this hack. This variable simply defines the default sub-group that new categories are given within their parent category. There is normally no reason to change this setting.

Am I missing what you are trying to achieve?

AndrewD
12-18-2004, 09:02 AM
I have a couple of issues with my install:

1. The only copy I could find of get_hotlinks.php was in the natch subdirectory. The other 2 files were in the root of the unzipped folder. Did I use the correct file?

2. I receive the following error while creating tables:

mysql error: The used table type doesn't support FULLTEXT indexes



You're right - get_hotlinks.php is only used for an integration of this hack with VBindex/VBadvanced developed by Natch. I'd forgotten that the code was a subdirectory deep. I'll update the instructions accordingly.

On the second point, I'll have a look how to adjust the installation script to deal with MySQL 4.1

AndrewD
12-18-2004, 11:28 AM
You're right - get_hotlinks.php is only used for an integration of this hack with VBindex/VBadvanced developed by Natch. I'd forgotten that the code was a subdirectory deep. I'll update the instructions accordingly.

On the second point, I'll have a look how to adjust the installation script to deal with MySQL 4.1

It should be sufficient to add one line in the local_links_install.php script. Can you test and let me know? (you'll have to uninstall and reinstall)

echo "--- Creating ".THIS_TABLE."linkslink if it does not exist<br />";

$asb = $DB_site->query("
CREATE TABLE IF NOT EXISTS ".THIS_TABLE."linkslink (
linkid int(11) NOT NULL auto_increment,
linkname varchar(255) NOT NULL,
linkdesc text NOT NULL,
linkurl text NOT NULL,
linkhits mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
linkforum smallint(5) NOT NULL,
linkcheck int(10) unsigned NOT NULL,
linkstatus int(10) DEFAULT '0' NOT NULL,
linkdate int(10) NOT NULL,
linkusername text NOT NULL,
linkuserid int(10) NOT NULL,
linkmoderate int(2) NOT NULL,
linkmoddate int(10) DEFAULT '0' NOT NULL,
linkreviewfreq smallint(5) DEFAULT '0' NOT NULL,
PRIMARY KEY (linkid),
FULLTEXT KEY namedesc (linkname,linkdesc)
)
TYPE = MYISAM
");

Sovereign
12-18-2004, 09:10 PM
Sorry, one of us is confused ;) default_cat_dseq is the name I have given to one of the settings used by this hack. This variable simply defines the default sub-group that new categories are given within their parent category. There is normally no reason to change this setting.

Am I missing what you are trying to achieve? I was wondering whether there was a language string. As in the vB Phrase system...cause I noticed that some of it was not expressed in variables...

Tbird66
12-18-2004, 11:57 PM
It should be sufficient to add one line in the local_links_install.php script. Can you test and let me know? (you'll have to uninstall and reinstall)
The database install completed successfully, and step 2 Set up templates completed successfully, but now I get the following message:

Step 2 - Template import complete
Run Step 3: Goto (http://www.mydomain.com/local_links.php?action=admin) Links/Files AdminCP to check/initialise permissions?
Installation complete: Goto (http://www.mydomain.com/local_links.php?action=links) Links/Files main page
Delete this script when done
Go back (http://www.mydomain.com/local_links_install.php?action=0)to the start

If I click either Goto link then I get the follwing error:
PHP Warning: array_merge() [function.array-merge]: Argument #2 is not an array in C:\Forum Site\includes\init.php on line 517 PHP Warning: Invalid argument supplied for foreach() in C:\Forum Site\includes\sessions.php on line 270 PHP Warning: array_merge() [function.array-merge]: Argument #2 is not an array in C:\Forum Site\includes\functions.php on line 3615

Any ideas?

Thanks!