View Full Version : Links and Files Database
AndrewD
01-17-2004, 10:00 PM
The VB3.0 version is no longer supported although there have been no reported problems for some time
See here for the VB 3.6 version of this hack, which is now the supported version. This version currently also works with VB 3.5
See here for the VB 3.5 thread for this hack.
What's new in v1.60?
Option to display associated thumbnail images
Option to accept/not accept new entries if these already exists in database
Code for mass edits (accessed via admincp) tidied up
VB phrasing completed
Includes a full French and a partial German translation (thanks to cclaerhout, Allan and LeeWicKeD), handled properly by installation script.
Various bugs fixed and tested against php4 and php5:
Better database validation (on startup/in admincp: links with invalid associated forumids, categories with invalid parentids)
Alternative linkbit templates provided (default uses a fieldset, the other is the old-style table row)
Alternative category selection templates (pull down menu/list of checkboxes),
Star rating displayed using standard VB stars rather than in text form
Series of minor bug fixes
See file change.txt in zip file
What it is/does
- Provides a searchable database of weblinks and/or downloadable files, for example manuals, music files, pictures, etc.
- Integrates within VBulletin, without requiring any code changes.
- Transparently handles links and file downloads. (If you want to provide downloads from your own site, you need a separate tool to upload these files. This hack does not and will not include a file uploader.)
- Provides unlimited nested categories.
- Each link/file can be a member of multiple categories.
- Link and category title and descriptions can use all BBCODEs, giving the possibility to add images, colouring, etc, as you wish
- Viewing/access permissions controlled using VBulletin forum system
- Users can rate links, in a similar manner to VB thread rating.
- File downloads are semi-leechproof, i.e. the user does not see where the file is stored and can only access the link if she has access to the associated forum.
- Audio files playable via Windows Media Player can be offered as a jukebox .
- Tracks who downloads what
- Validates links on entry/editing, and provides admin facility to validate the entire database.
Installation/upgrading instructions
Read instructions.txt in the zip file. Installation script works out whether to install or upgrade.
To upgrade from an earlier release of this hack, simply re-run the installation script. If you modified the templates in the top styles, you will lose these modifications unless you back up and re-edit.
PLEASE BACK UP YOUR DATABASE
See also
For screen shots, see attachments.
Tested with
VBulletin 3.0 and higher
PHP 4.1.1 and 4.3.4, should work with all 4.x versions, seems ok with 5.0.4
MySQL 4.0.
Reported ok with MySQL 4.1 but not exhaustively tested
Credits
Initially inspired by drkFusion's vb2 hack "vb Link Directory" v.2 and discussion about v.3 on Vbulletin.org. This is a complete rewrite with many more features. Every credit to the VBulletin folks for providing the infrastructure and to those on vbulletin.org who have helped with testing.
Integrations/Conversions
Natch has written extensions to integrate this hack with VBindex and VBAdvanced.
For convenience, this hack includes fully integrates with, but does not install, his VBIndex hack - i.e. the required template and code are provided, and the admin panel handles the configuration settings. Please refer to his thread for instructions.
Integration with VBadvanced is described in thread 1319 at vbadvanced.com.
The zip file includes a script and instructions for converting from vbLinks v2 (see thread 44551
tomshawk
01-18-2004, 04:16 PM
Sounds like something I could use, Got any screenshots?
gmarik
01-18-2004, 05:09 PM
This is what we needed. Several things:
- not integrated with the admin cp is no good - you need to integrate it, it's the most important part
- we could make the design together - and we could cooperate with other download zone vb2 hackers to unite the code and make it even better.
dede1
01-18-2004, 06:10 PM
Error comes with me if I one left to insert wants:
Database error in vBulletin 3.0.0 Release Candidate 2:
Invalid SQL:
INSERT INTO local_linkslink (linkname, linkurl, linkdesc, linkimage, hits, linkforum, linkcheck, linkstatus)
VALUES (
'Dede1',
'http://www.dede1.de',
'test test',
'http://63.246.136.220/Board/images/misc/vbulletin3_logo_white.gif',
0,
'9',
1074456318,
0
)
mysql error: Unknown column 'linkcheck' in 'field list'
mysql error number: 1054
Date: Sunday 18th of January 2004 03:05:58 PM
Script: http://63.246.136.220/Board/local_links.php
Referer: http://63.246.136.220/Board/local_links.php?action=addlink&catid=-1
Username: Dede1
IP Address: xxxxxxxxxxxxxx
Nmidia
01-18-2004, 06:16 PM
Error comes with me if I one left to insert wants:
I get this when I try and run the queries. I'm using RC1. Is it incompatible?
An error occurred while attempting to execute your query. The following information was returned.
error number: 1064
error desc: You have an error in your SQL syntax near ';
CREATE TABLE local_linkscat (
catid smallint(5) NOT NULL auto_increment,
' at line 1
AndrewD
01-18-2004, 06:17 PM
Error comes with me if I one left to insert wants:
fixed, answer no longer relevant
gmarik
01-18-2004, 06:22 PM
You should add:
- admin / moderator {editor} link rating (5 stars)
- links out
- links in page
- total statistics
Nmidia
01-18-2004, 06:28 PM
You should add:
- admin / moderator {editor} link rating (5 stars)
- links out
- links in page
- total statistics
Also would be good to add a way of iconising the fact that you have categories. So cats have an icon, links have their own icon
Nmidia
01-18-2004, 06:29 PM
sorry - try downloading the zip again or use the definition below - I'd included an old set of table definitions
DROP TABLE IF EXISTS local_linkslink;
CREATE TABLE local_linkslink (
linkid int(11) NOT NULL auto_increment,
linkname varchar(255) NOT NULL,
linkdesc text NOT NULL,
linkurl text NOT NULL,
linkimage text NOT NULL,
hits text NOT NULL,
linkforum smallint(5) NOT NULL,
linkcheck int(10) unsigned NOT NULL,
linkstatus smallint(2) NOT NULL,
PRIMARY KEY (linkid)
);
I re-ran the queries and got exactly the same error. My error is in the local_linkscat query.
AndrewD
01-18-2004, 06:36 PM
I re-ran the queries and got exactly the same error. My error is in the local_linkscat query.
fixed, no longer relevant
Agree with you about the icons
Nmidia
01-18-2004, 06:43 PM
Not sure what's happing to you - I tried the sql code and it's fine for me. Is this what you're trying to execute?
DROP TABLE IF EXISTS local_linkscat;
CREATE TABLE local_linkscat (
catid smallint(5) NOT NULL auto_increment,
catname varchar(255) NOT NULL,
catdesc text NOT NULL,
cattext mediumtext NOT NULL,
parentid smallint(5) NOT NULL,
parentlist varchar(250) NOT NULL,
catforum smallint(5) NOT NULL,
PRIMARY KEY (catid)
);
Agree with you about the icons
was being a bit of a muppet. Running that querry through my forum did nothing. I then ran it from PHPMyAdmin from host, importing the file did nothing. The I ran it in query window, worked. The entire thing works fine now:)
dede1
01-18-2004, 06:52 PM
sorry - try downloading the zip again or use the definition below - I'd included an old set of table definitions
);
thanks l?uft jetzt
dede1
01-18-2004, 07:36 PM
Error comes with me if I one left to insert wants:
Database error in vBulletin 3.0.0 Release Candidate 2:
Invalid SQL:
SELECT mimetype
FROM attachmenttype AS attachmenttype
WHERE extension = 'php'
LIMIT 1;
mysql error: You have an error in your SQL syntax near ';
' at line 5
mysql error number: 1064
Date: Sunday 18th of January 2004 04:37:29 PM
Script: http://63.246.136.220/Board/local_links.php?action=jump&id=4
Referer: http://63.246.136.220/Board/local_links.php?action=links&catid=3
Username: Dede1
IP Address: xxxxxxxxxxxxxxx
gmarik
01-19-2004, 07:09 AM
:rolleyes: Yes, icons are very important - 32x32 icons, that have the same id, as the cetegory. For example Photoshop link category with ID=4 has a gif stored in folder images/links called l04.gif and so, if the icon option is turned on, the users sees it - it's a very important thing and must be operated from the admin CP. http://tutorials.yaxay.com/
colicab-d
01-19-2004, 07:13 AM
gmarik are you using andews files/link archive in those pictures or are you using your own one? if so why not release it, or maybe just to me :d lol
gmarik
01-19-2004, 10:20 AM
I'm using my own, but I don't know how to code it vb3, if somebody could code it for me.
Dean C
01-19-2004, 03:30 PM
Hehe you beat me to releasing mine - never mind ;) Looks good so far.
Dark_Wizard
01-19-2004, 05:07 PM
I'm using my own, but I don't know how to code it vb3, if somebody could code it for me.
Contact me via PM...
*arie
01-20-2004, 07:14 PM
very nice.
/me clicks install.
limey
01-21-2004, 01:32 AM
I'll say very nice and I love the way it works...admincp would be "nice" but its great anyway....nice job.
Didi_gt
01-23-2004, 04:17 PM
Error comes with me if I one left to insert wants:
open local_links.php
search
$jumpmime = $DB_site->query("
SELECT mimetype
FROM " . TABLE_PREFIX . "attachmenttype AS attachmenttype
WHERE extension = '$type'
LIMIT 1;
");
replace with:
$jumpmime = $DB_site->query("
SELECT mimetype
FROM " . TABLE_PREFIX . "attachmenttype AS attachmenttype
WHERE extension = '$type'
LIMIT 1
");
save file & upload ...done
AndrewD
01-25-2004, 09:03 AM
Version beta 0.2 released, see first post.
Many features added which have been suggested in this thread
dede1
01-25-2004, 03:27 PM
Hello
if I want there
http://63.246.136.220/Board/local_links.php?action=links (http://63.246.136.220/Board/local_links.php?action=links)
that comes
Database error in vBulletin 3.0.0 Release Candidate 3:
Invalid SQL:
SELECT link.linkid AS linkid, link.linkname AS linkname,
link.linkurl AS linkurl, link.linkdesc AS linkdesc,
link.linkhits AS linkhits, link.linkstatus AS linkstatus, link.linkdate AS linkdate
FROM local_linkslink AS link
LEFT JOIN local_linksltoc AS ltoc
ON link.linkid = ltoc.linkid
WHERE
ltoc.catid = -1
AND link.linkforum NOT IN (0)
ORDER BY linkname
mysql error: Unknown column 'link.linkhits' in 'field list'
mysql error number: 1054
Date: Sunday 25th of January 2004 12:25:09 PM
Script: http://63.246.136.220/Board/local_links.php?action=links
Referer: http://63.246.136.220/Board/local_links.php?action=admin
amairiya
01-25-2004, 07:43 PM
I haven't installed this or anything, but let me say it looks really awesome and I will install it once it is in it's full release state.
I'm sorry if this is already previously mentioned, but does this allow for the admin to grant access to the files per usergroup? I would like to integrate having access to downloading the files to a premium/paid usergroup, but have the links database be accessible to all.... Is that already implemented? Thanks and sorry.
pcalloway
01-26-2004, 04:03 AM
I installed this 0.2 version on my vb3.0 r3 board, following the instructions in the .txt but I can't tell if its working or not. I tried pointing toward /forum/local_links.php and just got a blank page.
How do I set this thing up and integrate it?
allan grossman
01-26-2004, 05:24 PM
I installed this 0.2 version on my vb3.0 r3 board, following the instructions in the .txt but I can't tell if its working or not. I tried pointing toward /forum/local_links.php and just got a blank page.
How do I set this thing up and integrate it?
I haven't installed 0.2 but when I had that problem with 0.1 it was missing templates. Of course, YMMV ;)
pcalloway
01-27-2004, 03:44 AM
Got another problem - finally got it running but now when I click a link I get:
Error - Link #pcalloway not set.
AndrewD
01-27-2004, 07:13 PM
Got another problem - finally got it running but now when I click a link I get:
Error - Link #pcalloway not set.
Can you go into your VB adminCP, backup the four local_links tables and pm them to me, so that I can see what's going on?
AndrewD
01-27-2004, 07:18 PM
I haven't installed this or anything, but let me say it looks really awesome and I will install it once it is in it's full release state.
I'm sorry if this is already previously mentioned, but does this allow for the admin to grant access to the files per usergroup? I would like to integrate having access to downloading the files to a premium/paid usergroup, but have the links database be accessible to all.... Is that already implemented? Thanks and sorry.
Access to files/links and categories is controlled by assigning them to a forum. So if you want only some usergroups to see certain links, you assign these links (or their category) to a forum that has the same usergroup permissions. The association between link and forum or category and forum can be changed by anyone who has can_edit_link and/or can_edit_category access to the links database (set via the link_admin page).
AndrewD
01-27-2004, 07:21 PM
Hello
if I want there
http://63.246.136.220/Board/local_links.php?action=links (http://63.246.136.220/Board/local_links.php?action=links)
that comes
Database error in vBulletin 3.0.0 Release Candidate 3:
Invalid SQL:
SELECT link.linkid AS linkid, link.linkname AS linkname,
link.linkurl AS linkurl, link.linkdesc AS linkdesc,
link.linkhits AS linkhits, link.linkstatus AS linkstatus, link.linkdate AS linkdate
FROM local_linkslink AS link
LEFT JOIN local_linksltoc AS ltoc
ON link.linkid = ltoc.linkid
WHERE
ltoc.catid = -1
AND link.linkforum NOT IN (0)
ORDER BY linkname
mysql error: Unknown column 'link.linkhits' in 'field list'
mysql error number: 1054
Date: Sunday 25th of January 2004 12:25:09 PM
Script: http://63.246.136.220/Board/local_links.php?action=links
Referer: http://63.246.136.220/Board/local_links.php?action=admin
Have you upgraded the database as per instructions? linkhits was not in the v0.1 database.
dede1
01-27-2004, 07:45 PM
linkhits? Is the templates?
Where is to be? I inserted 11 Templates
13th_Disciple
01-27-2004, 11:52 PM
updating the database won't be a template.. there is probably a query you didn't run for the install of 0.2
check your install and make sure you followed all directions.. haven't installed this hack, but since it refers to an unknown column, that means there should be a column that isn't there and was probably added by a query for the install..
AndrewD
01-28-2004, 04:24 AM
linkhits? Is the templates?
Where is to be? I inserted 11 Templates
The zip file that you downloaded contained a file called instructions.txt and a file called links_maketable.sql. This is only the beta 0.2 release, so you have to manually run the sql code in the second file, e.g. using phpmyadmin or the command line mysql.exe etc. This sets up the four tables and populates the admin table. The next release will automate this process. Sorry if this is confusing.
After installation, you will have four tables (all with names starting local_links), eleven templates (all with names starting links_) and one php file.
dede1
01-28-2004, 06:25 AM
Yes that have I everything made.
Nevertheless this error comes
Natch
01-29-2004, 02:07 AM
PM sent re: a HTL version I made for my own use ...
AndrewD
01-29-2004, 05:32 PM
Yes that have I everything made.
Nevertheless this error comes
Pls use VB's adminCP to backup just the 4 local_links tables and pm then to me so that I can take a look.
SpankMe
01-31-2004, 03:25 AM
Just installed this and found the following bug:
The userid and username are not added to the links db when a member adds a link.
replace:
$DB_site->query("
INSERT INTO local_linkslink (linkname, linkurl, linkdesc, linkhits, linkforum, linkcheck, linkstatus, linkdate)
VALUES (
'".addslashes(htmlspecialchars($linkname))."',
'$linkurl',
'".addslashes(htmlspecialchars($linkdesc))."',
0,
'$pforum',
$statustime,
$statuscheck,
$statustime
)
");
with:
$DB_site->query("
INSERT INTO local_linkslink (linkname, linkurl, linkdesc, linkhits, linkforum, linkcheck, linkstatus, linkdate, linkusername, linkuserid)
VALUES (
'".addslashes(htmlspecialchars($linkname))."',
'$linkurl',
'".addslashes(htmlspecialchars($linkdesc))."',
0,
'$pforum',
$statustime,
$statuscheck,
$statustime,
'".addslashes(htmlspecialchars($bbuserinfo[username]))."',
$bbuserinfo[userid]
)
");
and replace:
$query = "
SELECT link.linkid AS linkid, link.linkname AS linkname,
with:
$query = "
SELECT link.linkid AS linkid, link.linkname AS linkname, link.linkuserid AS linkuserid,
and add the following:
$linkuserid = $myrow["linkuserid"];
below this code:
while ($myrow=$DB_site->fetch_array($asb)) {
$linkid = $myrow["linkid"];
$linkname = parse_bbcode2($myrow["linkname"], 1, 1, 1, 1);
$linkurl = $myrow["linkurl"];
$linkhits = $myrow["linkhits"];
$linkstatus = $myrow["linkstatus"];
also the templates are not setup to show the "edit" link for members own links.
In the links_linkbit template
replace:
<if condition="$links_permissions[can_edit_link]>
with:
<if condition="$links_permissions[can_edit_link] or $bbuserinfo[userid] == $linkuserid">
I think thats everything.
AndrewD
01-31-2004, 05:52 AM
Just installed this and found the following bug:
The userid and username are not added to the links db when a member adds a link.
etc
I think thats everything.
Thanks - will make these fixes in the main release - the userid code was one of the more recent bits to go in. Appreciate your effort.
daFish
02-02-2004, 08:55 AM
<font face="Arial">Great Hack but what about a HTL version?
Is there one available?
-Fish
</font>
AndrewD
02-02-2004, 08:58 AM
Great Hack but what about a HTL version?
Is there one available?
-Fish
Yes, the next beta will be an HTL version - but give me a few days as I've a lot on this week.
Thanks to Natch for the insight into HTL.
daFish
02-03-2004, 07:54 AM
Yes, the next beta will be an HTL version - but give me a few days as I've a lot on this week.
Thanks to Natch for the insight into HTL.
Sounds good.
Thanks for this information. :)
13th_Disciple
02-04-2004, 11:49 AM
i have downloaded this, but have yet to install it.. and haven't had a chance to look at it installed anywhere else.. so a couple of questions..
does this allow for comments by members?
are you going to make a place for members based uploads? of course these uploads are moderated before added to the downloads/links catagories so they can be verified first.
and if so, will you incorporate a file manager type interface.. a kin to the vbftp from erwin, so the admin can move files around and place them in folders on the server that correspond to the way the admin would like the files stored? that way you don't have to log in to ftp/ssh to move files around.. would be ultra handy and quite fast.. this part can actually be done with Erwins hack.. so you might could incorporate that.. or just tell folks to use that as a file manager since it is only available in the admincp..
anyway, these are just a few ideas.. but member comments, ratings and things like that would be very handy.. i saw that you mentioned a ratings system..
thanks for any info you can offer me relating to these ideas.. even if they do suck.. :/
Natch
02-04-2004, 07:35 PM
i have downloaded this, but have yet to install it.. and haven't had a chance to look at it installed anywhere else.. so a couple of questions..
does this allow for comments by members?
are you going to make a place for members based uploads? of course these uploads are moderated before added to the downloads/links catagories so they can be verified first.
and if so, will you incorporate a file manager type interface.. a kin to the vbftp from erwin, so the admin can move files around and place them in folders on the server that correspond to the way the admin would like the files stored? that way you don't have to log in to ftp/ssh to move files around.. would be ultra handy and quite fast.. this part can actually be done with Erwins hack.. so you might could incorporate that.. or just tell folks to use that as a file manager since it is only available in the admincp..
anyway, these are just a few ideas.. but member comments, ratings and things like that would be very handy.. i saw that you mentioned a ratings system..
thanks for any info you can offer me relating to these ideas.. even if they do suck.. :/
You can see this on my forum www.mobileforces.org - PM me for a temp login/pwd if u dont wanna sign up ...
obsidian
02-05-2004, 08:18 PM
I am having an issue with the links not showing up. It installed without a hitch. After that I went in and setup some categories and then added a link. The link shows up under the admin panel as an available link but when I go to the category it is not there. I thought maybe the link was the problem but I have since put links in for google and several other sites and they all get listed as broken and nothing shows up.
Any help would be appreciated.
gmarik
02-06-2004, 09:01 AM
How can I use it with File storage? See only links ...
obsidian
02-06-2004, 12:27 PM
All you have to do is upload all of the files and then use the hack to list the link to the directory where they are stored.
AndrewD
02-06-2004, 05:27 PM
I am having an issue with the links not showing up. It installed without a hitch. After that I went in and setup some categories and then added a link. The link shows up under the admin panel as an available link but when I go to the category it is not there. I thought maybe the link was the problem but I have since put links in for google and several other sites and they all get listed as broken and nothing shows up.
Any help would be appreciated.
Obsidian - which "forum" did you assign the link to? - this is used as a permissions check. Links are only visible to users that could access the specified forum.
Try pointing your browser at http://yoursite/forum/local_links.php?action=show&check=1, forum/local_links.php?action=show&check=0 and forum/local_links.php?action=show&check=-1 - these will show you all the valid, inaccessible links and invalid links.
If all that fails, pm me a dump of the five sql tables local_link* and I'll try to see what's going on.
AndrewD
02-06-2004, 05:31 PM
does this allow for comments by members? - not yet, but I plan to add a star rating - would comments be better?
are you going to make a place for members based uploads? - not at present, this can be done with other utilities as you mention. you can then use this hack to link to the uploads, although I might think about this later. I'll just document the possibility
and if so, will you incorporate a file manager type interface.. see previous
anyway, these are just a few ideas.. but member comments, ratings and things like that would be very handy.. i saw that you mentioned a ratings system..
even if they do suck.. : no, not at all... thanks
obsidian
02-06-2004, 05:53 PM
I went back through everything to verify that I had done the install correctly. I thought that one of the templates might be messed up since everything was showing in the database. I deleted all of the templates and then created new ones and its up and running now. Something must not have pasted correctly. Thanks for the help though....I am using your hack to setup an internal documentation control system similiar to the one on your demo link. Lots of possibilites.
Natch
02-06-2004, 08:38 PM
How can I use it with File storage? See only links ...
You have to point to an actual file ...
13th_Disciple
02-06-2004, 10:34 PM
Natch - signed up.. me and a couple of friends have an idea for a mod for UT2004 that is named very similar to Mobile Forces.. in fact, i made mention of MF when we first discussed the name.. the name we are considering is Mobile Fortress.. or Mobile Ultra Fortress.. MuF for short.. :D
Andrew - thanks for the answers.. imo, i think comments and ratings would be a good idea.. i guess it depends on the level you are willing to go coding wise as to what you personally would rather incorporate. but i myself would like to see both brought into the hack.. and yeah, i know about a couple other ways to do the upload bit.. but i am looking for something that completely incorporates with vB3.. i know i can use a php based upload util and just do an include in a non vB page.. but it would be ultra smooth to have it pre-made, so to speak, within a hack..
i am very interested in this hack and the development of it because i am in need of a very good script like this.. the way Natch incorporated it is very good.. although instead of a drop down, i think i just may link to a catagories page that will then break everything down from there..
nice site btw, Natch.. and as i said, gonna, maybe, half-ass, steal the name.. even though it ain't outright theivery.. :D
also, Andrew, if there is anything i can do to help you oput with all of this, let me know.. don't mind testing, commenting, critiqueing.. whatever kind of help you need.. as i said, very interested in its development..
and thanks again for the info folks..
Natch
02-08-2004, 10:04 AM
For those that use this with vBIndex, I have made a Customblock for "Hottest Links" ie those links with the highest hit count.
Most important upgrade I think this needs is for the linkhits counts to be stored as MEDIUMINT( 8 ), not TEXT ...
ALTER TABLE `local_linkslink` CHANGE `linkhits` `linkhits` MEDIUMINT( 8 ) UNSIGNED DEFAULT '0' NOT NULL;
Check it out - https://vborg.vbsupport.ru/showthread.php?t=61311
AndrewD
02-08-2004, 05:31 PM
[QUOTE=AndrewD]Release 0.3, February 2004 (0.2 also still available as an attachment)
version 0.3 released. deals also with Natch's table change
13th_Disciple
02-08-2004, 07:34 PM
bout to upgrade from 0.2 to 0.3 now.. so all i should need to do is add the xml file thru the admincp, upload the install and local_links.php files, run the install file, and everything should be back to good?
reckon i will find out shortly..
Natch
02-08-2004, 10:04 PM
Nice work on the re-release Andrew :)
Natch
02-08-2004, 11:29 PM
I ran the upgrade, and found that all the settings have been set to -1, which causes the permissions functions not to work ...
AndrewD
02-09-2004, 04:19 AM
I ran the upgrade, and found that all the settings have been set to -1, which causes the permissions functions not to work ...
Which settings? Do you mean the forum permissions? There is a new entry in the admin table, default_forumid, which you must initialise to the id of the forum which carries the standard viewing permissions to be applied to new links. There is also the setting can_set_permissions, which defines the user groups that can override this setting.
I'm not happy with the way I've written this part of the code - using forum permissions seems the right way to handle things, but I suspect that the default situation should be to give automatic access to all links. What do you think?
Natch
02-09-2004, 10:08 AM
Which settings? Do you mean the forum permissions? There is a new entry in the admin table, default_forumid, which you must initialise to the id of the forum which carries the standard viewing permissions to be applied to new links. There is also the setting can_set_permissions, which defines the user groups that can override this setting.
I'm not happy with the way I've written this part of the code - using forum permissions seems the right way to handle things, but I suspect that the default situation should be to give automatic access to all links. What do you think?
When I say all the settings have been set to -1...
By default, after this upgrade, the new setting (default_forumid) is set to -1 - well after running the local_links_install.php, the rest of the entries in the admin table also had the value -1, causing a major failure of the Admin script - so much so that the admin page now looks like this - (screenshot attached) ...
Any suggestions ?
AndrewD
02-09-2004, 10:15 AM
When I say all the settings have been set to -1...
By default, after this upgrade, the new setting (default_forumid) is set to -1 - well after running the local_links_install.php, the rest of the entries in the admin table also had the value -1, causing a major failure of the Admin script - so much so that the admin page now looks like this - (screenshot attached) ...
Any suggestions ?
No idea - this has not happened to me and I ran several test installations and upgrades on different sites before releasing the code.
Please send me a backup of the database table local_linksadmin so that I can see what is happening.
Natch
02-09-2004, 10:25 AM
Email on it's way...
AndrewD
02-09-2004, 10:28 AM
Email on it's way...
Not yet arrived, but I see at least one problem...
If you clear all the permission boxes, you end up with the database entries set to -1 (this is a bug which I will sort out this evening). I don't know if you have done this explicitly - the first time the admin script runs, it should set the permission settings to group 6, which is the default administrator group (or maybe it isnt??). So simply select which user groups are to be given permission to do the various things and everything should work ok.
If this doesn't work, then we have a different problem. !!
Natch
02-09-2004, 11:34 AM
My bad - I'm sorry - I had made some bad edits in the admin_oneperms template ...
Working great :) thanks my users love it :) :)
Tradjick
02-09-2004, 03:01 PM
I run Release4 and got this when executing the script:
---------------------------------------------------------------------------------------------------
Creating local_linksadmin if it does not exist
Creating local_linksdownloads if it does not exist
Creating local_linkscat if it does not exist
Creating local_linkslink if it does not exist
Modifying local_linkslink if necessary
Creating local_linksltoc if it does not exist
Creating local_linksrate if it does not exist
Database modifications complete
step 2 goto VB AdminCP to set up templates
step 3 goto Links/Files AdminCP to initialise permissions
step 4 goto Links/Files main page
---------------------------------------------------------------------------------------------------
When running /forum/local_links.php?action=admin:
---------------------------------------------------------------------------------------------------
Warning - Ask administrator to initialise database
---------------------------------------------------------------------------------------------------
And when running the last link i get this:
---------------------------------------------------------------------------------------------------
Database error in vBulletin 3.0.0 Release Candidate 4:
Invalid SQL:
SELECT link.linkid AS linkid, link.linkname AS linkname, link.linkuserid AS linkuserid,
link.linkusername AS linkusername, link.linkurl AS linkurl, link.linkdesc AS linkdesc,
link.linkhits AS linkhits, link.linkstatus AS linkstatus, link.linkdate AS linkdate
FROM local_linkslink AS link
LEFT JOIN local_linksltoc AS ltoc
ON link.linkid = ltoc.linkid
WHERE
ltoc.catid = -1
AND link.linkforum NOT IN (0,)
ORDER BY linkname
mysql error: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ')
ORDER BY linkname' at line 10
mysql error number: 1064
Date: Monday 09th of February 2004 06:02:09 PM
Script: http://localhost/forum/local_links.php?action=links
Referer: http://localhost/forum/local_links_install.php
Username: Abrel_Knezquawr
IP Address: 127.0.0.1
---------------------------------------------------------------------------------------------------
Do you have any ideas? Or is that just because the hack isn't meant to use with R4?
AndrewD
02-09-2004, 03:49 PM
I run Release4 and got this when executing the script:
---------------------------------------------------------------------------------------------------
Creating local_linksadmin if it does not exist
Creating local_linksdownloads if it does not exist
Creating local_linkscat if it does not exist
Creating local_linkslink if it does not exist
Modifying local_linkslink if necessary
Creating local_linksltoc if it does not exist
Creating local_linksrate if it does not exist
Database modifications complete
step 2 goto VB AdminCP to set up templates
step 3 goto Links/Files AdminCP to initialise permissions
step 4 goto Links/Files main page
---------------------------------------------------------------------------------------------------
When running /forum/local_links.php?action=admin:
---------------------------------------------------------------------------------------------------
Warning - Ask administrator to initialise database
---------------------------------------------------------------------------------------------------
And when running the last link i get this:
---------------------------------------------------------------------------------------------------
Database error in vBulletin 3.0.0 Release Candidate 4:
Invalid SQL:
SELECT link.linkid AS linkid, link.linkname AS linkname, link.linkuserid AS linkuserid,
link.linkusername AS linkusername, link.linkurl AS linkurl, link.linkdesc AS linkdesc,
link.linkhits AS linkhits, link.linkstatus AS linkstatus, link.linkdate AS linkdate
FROM local_linkslink AS link
LEFT JOIN local_linksltoc AS ltoc
ON link.linkid = ltoc.linkid
WHERE
ltoc.catid = -1
AND link.linkforum NOT IN (0,)
ORDER BY linkname
mysql error: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ')
ORDER BY linkname' at line 10
mysql error number: 1064
Date: Monday 09th of February 2004 06:02:09 PM
Script: http://localhost/forum/local_links.php?action=links
Referer: http://localhost/forum/local_links_install.php
Username: Abrel_Knezquawr
IP Address: 127.0.0.1
---------------------------------------------------------------------------------------------------
Do you have any ideas? Or is that just because the hack isn't meant to use with R4?
All those messages are correct, up to the last SQL error. Did you carry out steps 2 and 3 as instructed - i.e. in step 3 did you enter a valid forum id into the box halfway down the page? I know that the code should not fall over if you forget - I shall fix that - but it looks to me as if you haven't initalised the database tables correctly. Try looking at step 3 again.
Tradjick
02-09-2004, 03:54 PM
Shame on me! I dindnt select the right styleid. :nervous:
Tradjick
02-09-2004, 05:19 PM
It works fine!
Could you just tell me please what to write into the vbindex_customblock_1 template in order to show the links?
13th_Disciple
02-09-2004, 06:26 PM
just put links to your links catagory ID's in the vbindex_customblock_1 in the content area of the custom block.. then select which side and where on the side you want it..
gmarik
02-09-2004, 06:39 PM
So I need to link to files or I can upload them as attachments?
Tradjick
02-09-2004, 06:55 PM
<table cellpadding="0" cellspacing="0" border="0" class="tborder" width="100%">
<tr>
<td>
<table cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%">
<tr>
<td class="tcat" style="text-align: center">
<a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('vbindex_customblock$box')"><img id="collapseimg_vbindex_customblock$box" src="$stylevar[imgdir_button]/collapse_tcat$collapseimg_vbindex_customblock.gif" alt="" border="0" /></a>
<strong>Custom Block $box</strong>
</td>
</tr>
<tbody id="collapseobj_vbindex_customblock$box" style="$collapseobj_vbindex_customblock">
<tr>
<td class="alt1">
<div class="smallfont">Block $box Content</div>
<?php
chdir ("./forums");
error_reporting)E_ALL & ~E_NOTICE);
$globaltemplates = array(
'links_main'
);
require once ("./global.php")
eval ('print_output("' . fetch template('links_main') . ");');
?>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</table>
<br />
-------------------------------------------------------------------------------
Blame me but I still got no idea how to do that.
13th_Disciple
02-09-2004, 10:07 PM
So I need to link to files or I can upload them as attachments?
just create a link to the file in the admin section of the links directory..
13th_Disciple
02-09-2004, 10:12 PM
<table cellpadding="0" cellspacing="0" border="0" class="tborder" width="100%">
<tr>
<td>
<table cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%">
<tr>
<td class="tcat" style="text-align: center">
<a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('vbindex_customblock$box')"><img id="collapseimg_vbindex_customblock$box" src="$stylevar[imgdir_button]/collapse_tcat$collapseimg_vbindex_customblock.gif" alt="" border="0" /></a>
<strong>Custom Block $box</strong>
</td>
</tr>
<tbody id="collapseobj_vbindex_customblock$box" style="$collapseobj_vbindex_customblock">
<tr>
<td class="alt1">
<div class="smallfont">Block $box Content</div>
<?php
chdir ("./forums");
error_reporting)E_ALL & ~E_NOTICE);
$globaltemplates = array(
'links_main'
);
require once ("./global.php")
eval ('print_output("' . fetch template('links_main') . ");');
?>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</table>
<br />
-------------------------------------------------------------------------------
Blame me but I still got no idea how to do that.
<table cellpadding="0" cellspacing="0" border="0" class="tborder" width="100%">
<tr>
<td>
<table cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%">
<tr>
<td class="tcat" style="text-align: center">
<a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('vbindex_customblock$box')"><img id="collapseimg_vbindex_customblock$box" src="$stylevar[imgdir_button]/collapse_tcat$collapseimg_vbindex_customblock.gif" alt="" border="0" /></a>
<strong>Custom Block $box</strong>
</td>
</tr>
<tbody id="collapseobj_vbindex_customblock$box" style="$collapseobj_vbindex_customblock">
<tr>
<td class="alt1">
<div class="smallfont">Block $box Content</div>
<a href="http://www.yourdomain.com/forums/local_links.php?action=links&catid=1">Downloads</a>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</table>
<br />
something like this here will work.. at least that's what i did.. Natch is a bit more aware of the way it works and may be able to give more insight into what you can do well beyond what i demonstrated there.. but that is the hard-coded, simplistic way, that i used on my site..
PixelFx
02-10-2004, 12:35 AM
can you add image/text attachment type system in the description fields that if you user group permits, shows images or links of images etc? this is seperate from the file download link ...
this way you could post a description of item, with screenshots then have a download for it ..
Natch
02-10-2004, 12:47 AM
So I need to link to files or I can upload them as attachments?
You can upload them as attachments, and link to the attachments, or you can simply link to files on your server, or on another server :)
Could you just tell me please what to write into the vbindex_customblock_1 template in order to show the links?
Take a wee look at the Addon I scripted (https://vborg.vbsupport.ru/showthread.php?t=61311) - it's got a simple set of instructions as well as a new template to add, and a new file to upload - the reason I did it this way was to show the number of links to all users for the customblock only - so my new file simply doeesn't make the permissions calls
13th_Disciple
02-10-2004, 12:55 AM
can you add image/text attachment type system in the description fields that if you user group permits, shows images or links of images etc? this is seperate from the file download link ...
this way you could post a description of item, with screenshots then have a download for it ..
yar.. i was thinking along those lines too.. also, maybe a couple of custom fields for downloads and links.. such as author/contributor, file size for DL's if it is a DL link..
also maybe a field for a link back to the authors site if it is a DL.. no need if it's just a link.. this way, if a field has no text in it, it's not echoed/printed out on the page.. probably just a template mod for those, but would also have to have a field for each in the db table for the hack as well or maybe a small additional table that only contains certain add-on fields..
is there gonna be adminCP integration at some point? i remember seeing folks ask for that, but don't remember reading an answer for it..
and Natch, you keep coming out with those add-ons and i will keep adding em on to my site.. :p
Natch
02-10-2004, 02:00 AM
AndrewD decided that AdminCP integration was no t the way to go - as I used the HTL to install this, it created my AdminCP link for me ... but all it does is link from the sidebar menu of the ACP to the admin link of the script ... easy to add :)
AndrewD
02-10-2004, 03:04 AM
yar.. i was thinking along those lines too.. also, maybe a couple of custom fields for downloads and links.. such as author/contributor, file size for DL's if it is a DL link..
also maybe a field for a link back to the authors site if it is a DL.. no need if it's just a link.. this way, if a field has no text in it, it's not echoed/printed out on the page.. probably just a template mod for those, but would also have to have a field for each in the db table for the hack as well or maybe a small additional table that only contains certain add-on fields..
is there gonna be adminCP integration at some point? i remember seeing folks ask for that, but don't remember reading an answer for it..
and Natch, you keep coming out with those add-ons and i will keep adding em on to my site.. :p
Author/contributor is already there - just modify the links_linkbit' template to refer to $linkusername. You should probably think about who can see this information.
DL Filesize should be there, and will be next time.
Other items like link back to the authors site, images and so on can all be done by including standard bbcodes in the link/category descriptions when you set up/edit the link/category. It just requires a bit of discipline in how you lay out the entry.
I avoided admincp integration - I try to keep hacks as free of VB as possible, to avoid difficulties when upgrading. But as Natch says, it's just a link, so as/when I get round to understanding htl properly, I may find that that is the way to do it.
Sadie Frost
02-10-2004, 04:14 AM
All those messages are correct, up to the last SQL error. Did you carry out steps 2 and 3 as instructed - i.e. in step 3 did you enter a valid forum id into the box halfway down the page? I know that the code should not fall over if you forget - I shall fix that - but it looks to me as if you haven't initalised the database tables correctly. Try looking at step 3 again.
I am really dumb - getting the same error as Tradjick - where exactly is the box?
Tradjick
02-10-2004, 06:37 AM
@Sadie Frost:
Edit: try this:
1.) you have to overwrite a style of your chice with the included .xml file.
2) use a link similar to this http://localhost/forum/local_links.php?s=&styleid=X
while X is the styleid that you overwrote in step 1.
3) link to this: http://localhost/forum/local_links.php?action=admin
4.) link to this: http://localhost/forum/local_links.php?action=links
Mickie D
02-12-2004, 02:28 PM
erm i can add a catogorie fine but i cannot see it :(
and i dont get any links up to view either i get the links navbar with search and links
i get the admin section, i think i get most of it but i cant see anything under the links bar :(
also i am using my general chat room for the permissions as it lets everyone view it :)
please help this seems so good but i am just lost as to what is going wrong for me
also it installs fine but where is the links ???
13th_Disciple
02-12-2004, 03:01 PM
what's the URL of your site?
obsidian
02-12-2004, 03:59 PM
You might be having the same problem I had. Go back through all the templates you installed and check to ensure they are all correct. I had the same problem so I went back and deleted my templates and reinstalled them and it started working.
AndrewD
02-12-2004, 04:09 PM
erm i can add a catogorie fine but i cannot see it :(
and i dont get any links up to view either i get the links navbar with search and links
i get the admin section, i think i get most of it but i cant see anything under the links bar :(
also i am using my general chat room for the permissions as it lets everyone view it :)
please help this seems so good but i am just lost as to what is going wrong for me
also it installs fine but where is the links ???
I really have to sort out this installation process - too many of you are having problems - sorry!!
I have the same suggstion as obsidian - the templates. Can you PM your site url + an admin userid, otherwise I can't really help you
SandsUSA
02-12-2004, 09:15 PM
This hack is exactly what I'm needing on my site. I mean 100%. I'm a bit leery of installing a .3 beta release, tho. How close are you to feature-complete? Hopefully, not .7 away :)
Natch
02-12-2004, 11:41 PM
I'm using it on my forum and it's definitly badly named ... it's only beta 0.3 cos he's released 2 updates from 0.1 - it's production ready IMO.
AndrewD
02-13-2004, 04:13 AM
This hack is exactly what I'm needing on my site. I mean 100%. I'm a bit leery of installing a .3 beta release, tho. How close are you to feature-complete? Hopefully, not .7 away :)
From what I see in this thread and on our own site, the hack is pretty solid, if you install it correctly.
These seem the only important features still left to add:
- Information on file size available in the links_linkbit template
- A rock solid installation and upgrade script (it's a bit too hands on at the moment and people have been messing up the template installation)
- A bit more documentation on the variables that are available to the templates
I intend adding these this weekend, if other things don't get in the way.
There are then three related "add ons"
- A utility script to scan the VB posts, find all URL tags and cross reference them into the links database. (This was the original reason for writing this hack - we have a large library of pdfs, scattered across many many posts.) This is nearly written
- The BBCodes needed to access links from within posts. This is trivial.
- A utility to export/import the links database. I need to brush up on my XML.
Natch has done the integration with VBIndex.
Any other big ones needed?
SandsUSA
02-13-2004, 03:45 PM
I Followed the instructions, and the install went smoothly.
This is exactly what I need for my link and file pages. Between vBulletin, vbIndex, and this hack, I have a perfect site :)
I highly recommend this hack to anyone browsing...
Thanks!
Sadie Frost
02-14-2004, 05:04 AM
Thank you Tradjick! That was exactly what I was missing :)
Hoffi
02-15-2004, 12:24 PM
Thank you Tradjick! That was exactly what I was missing :)
I wold love it if you use Phrases in the Future.
AndrewD
02-15-2004, 12:38 PM
I wold love it if you use Phrases in the Future.
I would love it too :ermm: but my family want me to spend more time with them than at the computer... Someday, maybe...
Mickie D
02-15-2004, 01:26 PM
I would love it too :ermm: but my family want me to spend more time with them than at the computer... Someday, maybe...
yeah my family are the same m8, tell me i am on my site to much :(
but anyway regarding admin acess to my forum
sorry m8y i once did that b4 and got burnt badly :(, its nothing personal against you but i am reluctant to give any details out at all :(
i would like to say i am more than patient to wait until you get some spare time and release a newer version when you get the time.
and thanks for the help
Regards
Mickie
ImportPassion
02-16-2004, 01:09 PM
what happened to the .95 version? I got an email saying you needed ppl to try it out.
AndrewD
02-16-2004, 01:11 PM
what happened to the .95 version? I got an email saying you needed ppl to try it out.
Yes, I sent that to the people who have installed the hack. I'm looking for a few people to test before I load it onto this site, just to check the new installation process. If you want to be part of that test, just send me an email (reply to the one I sent yesterday.)
Hoffi
02-16-2004, 03:52 PM
I would love it too :ermm: but my family want me to spend more time with them than at the computer... Someday, maybe...
Ah, Family. I remember there was something in the past. ;)
Sure.
Du you plan to build a Moderate-Queue? It's nice when Users can add Links and an Admin must moderate them.
If you chaged nothing the next week I can rebuild it with phrases.
Natch
02-16-2004, 07:17 PM
Yes, I sent that to the people who have installed the hack. I'm looking for a few people to test before I load it onto this site, just to check the new installation process. If you want to be part of that test, just send me an email (reply to the one I sent yesterday.)
Unfortunately a reply (to that email) would go to the webmaster@vbulletin.org ... how about a PM ?
AndrewD
02-16-2004, 07:36 PM
Version 0.95 is now available in the first post.
The new install script handles database table creation and template import. The db part is unchanged from beta 0.3 but the template handling is new. It works fine for me on both clean and already-installed boards, but who knows what it will do on yours :devious:
Seriously, the install script scans your database for all existing templates for this hack, and it deletes them. It then installs new templates in all styles that have a parentid of -1, i.e. all the root styles but not the master style. So if you have 0.3 installed and you have modified the release templates, be careful.
Usual instructions - read instructions.txt in the zip, back up your database, and let me know how it goes.
I do not intend adding phrasing, but will investigate moderation for release 1.0. If someone wants to help me with the phrasing, I'll certainly acknowledge your work, but please don't release parallel versions, at least for the time being.
Problems discovered in the 16/2 upload, 17/2/04: now corrected in the attached zip file
1) The code degraded poorly when there are several thousand links in the database. The main change required was to add another index on one of the tables (local_linksltoc ADD INDEX ( linkid ))
2) The installation script assumed that you are using RC4. THis has been corrected.
3) The instructions omitted to tell you to upload the local_links_templates.xml file into your forum, otherwise the installation will fail.
4) The code to change to using the standard table prefix is now back in the correct place.
tomshawk
02-17-2004, 05:16 PM
Here is version 0.95. I deliberately bury it down here until a couple of you have tried this out. Then I will move it to the first post.
The new install script handles database table creation and template import. The db part is unchanged from beta 0.3 but the template handling is new. It works fine for me on both clean and already-installed boards, but who knows what it will do on yours :devious:
Seriously, the install script scans your database for all existing templates for this hack, and it deletes them. It then installs new templates in all styles that have a parentid of -1, i.e. all the root styles but not the master style. So if you have 0.3 installed and you have modified the release templates, be careful.
Usual instructions - read instructions.txt in the zip, back up your database, and let me know how it goes.
I do not intend adding phrasing, but will investigate moderation for release 1.0. If someone wants to help me with the phrasing, I'll certainly acknowledge your work, but please don't release parallel versions, at least for the time being.
Problems discovered:
1) The code degrades poorly when there are several thousand links in the database, so some optimisation is needed for the final release 1.0. This is one of the required changes (which is not in the 0.95 script):
ALTER TABLE local_linksltoc ADD INDEX ( linkid )
2) The installation script assumes that you are using RC4. If you are running RC1-RC3, you can fix this by editing local_links_install.php as follows:
At line 300, replace
xml_import_style($xml, $styleid);
with
xml_import_style($xml, $styleid, -1, '', 1);
I've found one problem.
when editing a catagory, I get a no permission error then, I go back and the catagory is gone from the list, but when I go to create a new link or catagory, The catagory that is missing is there to be used as a parent catagory.
any ideas?
Tradjick
02-17-2004, 05:33 PM
...installing 0.95...
1) Your install instructions don't mention to upload the template.xml
That's what confused me a little on Step 2.
2) When editing a category it says that I don't have the permissions, although I didn't change permissions and am logged in as admin.
->when this happens, the category is deleted
->but still appears in the link statistics
tomshawk
02-17-2004, 05:47 PM
...installing 0.95...
1) Your install instructions don't mention to upload the template.xml
That's what confused me a little on Step 2.
2) When editing a category it says that I don't have the permissions, although I didn't change permissions and am logged in as admin.
->when this happens, the category is deleted
->but still appears in the link statistics
I see i'm not the only one :p
I forgot the mention the xml file, thanks for remembering, but even after uploading it, it failed, because it is newer then my VB3 RC3, so I manually installed it, over-writing the one there and telling it, to ignore the vBulletin version.
Any ideas AndrewD on the permissions problem. I tryed setting for -999 as well as setting it for an actual forumid for permisions
ImportPassion
02-17-2004, 06:06 PM
working great. inserted into all my skins great. Love that feature!
AndrewD
02-17-2004, 06:23 PM
I see i'm not the only one :p
I forgot the mention the xml file, thanks for remembering, but even after uploading it, it failed, because it is newer then my VB3 RC3, so I manually installed it, over-writing the one there and telling it, to ignore the vBulletin version.
Any ideas AndrewD on the permissions problem. I tryed setting for -999 as well as setting it for an actual forumid for permisions
Sorry about omitting to say "upload the templates" in the instructions.
I have difficulty with understanding your error messages concerning editing categories. If the templates are correctly installed, the menus, etc should not even give you the chance to do something that the admin has forbidden.
My guess is that, because of the missing instruction to upload the templates, you have got a mismatch between the templates and the software.
So I strongly recommend that you actually do upload the templates into your forum directory, then rerun the installation script from step 1, rather than manually installing the templates via the vb admincp. The installation script does a certain amount of tidying up.
Please let me know if, having done this, you still have the same problem.
I should explain the permissions system:
There are two completely separate types of permission, which may be confusing:
- There is a series of "permissions to do something" (can_add_link, can_edit_category, etc.) These are set per usergroupid in the links admin page. These are initialised the first time you visit the admin page. By default, all the permisssion are turned on for the admin group only. You have to decide who else should be able to do things.
- The hack connects to the standard forum permissions system to define who can see what.
a) If you set default_forumid to a negative value (any negative value), this part of the system is turned off, and all users see all categories and entries.
b) If you set default_forumid to the id of a real forum (you can get these id numbers by hovering the mouse over a forum link - it's the number N in the links f=N), then - by default - new links and categories will be created with the same viewing permissions as that forum. In other words, if a user can visit forum N, she can see the links that have been created. If she cant visit forum N, the links/categories will be invisible.
c) Regardless of the seeting of default_forumid, if you turn on can_set_permissions for a particular usergroup, then users in that group can over-ride the default_forumid and choose another forum setting instead.
Confused or clear?
Tradjick
02-17-2004, 06:36 PM
that helped it! Thanks for this hack, Andrew_D!
ImportPassion
02-17-2004, 08:16 PM
works gret for me.
THe one big thing I would like to see is integration into admincp for the admin stuff.
tomshawk
02-17-2004, 08:19 PM
It wont let me install the templates from the install file. It says cancelled as it is written for vbulletin 3.0 RC4 and I have RC3.
I guess I'll live with it, until I upgrade. Which probably wont be until gold.
It's still a very kewl hack, I jsut have to make dang sure about the name and everything, so I dont have to edit :p
Thank you
ImportPassion
02-17-2004, 08:21 PM
When you install the xml, make sure you click YES on the radio button that says something like if it was created with an older version yada yada
Hoffi
02-17-2004, 08:24 PM
...installing 0.95...
1) Your install instructions don't mention to upload the template.xml
That's what confused me a little on Step 2.
2) When editing a category it says that I don't have the permissions, although I didn't change permissions and am logged in as admin.
->when this happens, the category is deleted
->but still appears in the link statistics
I have the same thing.
Added a Category
Edit - The Edit-Screen opend.
By clicking on Save the NoPermissions Screen come up.
No I moved to administer.
Klicked on the new Forum created. No Permission.
In Links Home it is no longer avaiable.
In Administration I see it.
I set the ForumID to a negative Number for turning off the Forum-System.
I miss the Image-Field to enter an Image for the Link/Category... In Beta3 it was gone...
Tradjick
02-17-2004, 08:37 PM
@hoffi: the categories won't automatically show up after you change the links admin permissions.
you can either use sql to alter the permissions or phpmyadmin. you could then try to alter the forumpermission from -999 to an actual forumid. but no guarantees on if it will work.
i guess you haven't addet THAT much links into the corrupt categories so just delete them and make them new.
@AndrewD: would it be possible to add a little image near the category and the link description?
Tradjick
02-17-2004, 09:25 PM
i have another question:
how can we call the links page from a link from vbindex_customblock_1??? so that it would replace the news?
SteveK
02-17-2004, 10:06 PM
I tried the option of using the vb table prefix but got these tables instead...
Step 1 - Set up database tables
--- Creating TABLE_PREFIXlinksadmin if it does not exist
--- Creating TABLE_PREFIXlinksdownloads if it does not exist
--- Creating TABLE_PREFIXlinkscat if it does not exist
--- Creating TABLE_PREFIXlinkslink if it does not exist
--- Creating TABLE_PREFIXlinksltoc if it does not exist
--- Creating TABLE_PREFIXlinksrate if it does not exist
--- Modifying tables where necessary
Step 1 - Database modifications complete
Those were the exact table names that were created!
And yes I changed the commented lines around in both the required files. I just didn't change "TABLE_PREFIX" to my actual VB table prefix. I thought it would do this for me. Maybe that was the intent and it's just not working. Just thought you should be aware of this. Maybe a little more clarification here.
Otherwise all is good.
Thanks,
SteveK
Natch
02-17-2004, 11:50 PM
I tried the option of using the vb table prefix but got these tables instead...
Step 1 - Set up database tables
--- Creating TABLE_PREFIXlinksadmin if it does not exist
--- Creating TABLE_PREFIXlinksdownloads if it does not exist
--- Creating TABLE_PREFIXlinkscat if it does not exist
--- Creating TABLE_PREFIXlinkslink if it does not exist
--- Creating TABLE_PREFIXlinksltoc if it does not exist
--- Creating TABLE_PREFIXlinksrate if it does not exist
--- Modifying tables where necessary
Step 1 - Database modifications complete
Those were the exact table names that were created!
And yes I changed the commented lines around in both the required files. I just didn't change "TABLE_PREFIX" to my actual VB table prefix. I thought it would do this for me. Maybe that was the intent and it's just not working. Just thought you should be aware of this. Maybe a little more clarification here.
Otherwise all is good.
Thanks,
SteveK
TABLE_PREFIX should be " . TABLE_PREFIX . " akaINSERT INTO `" . TABLE_PREFIX . "linkslink` VALUES ... get it ? the " . TABLE_PREFIX . " needs to be outside the processed SQL and to be inserted as a variable value from the global scope of your PHP script ...
AndrewD
02-18-2004, 04:28 AM
Tables
The instructions were too clear, I guess, and the code moved itself around while I wasn't watching...
If you want to use table names other than the default I use (local_) - you don't need to, you just might decide to have a different consistency - you change the following line in local_links.php and in local_links_install.php
define('THIS_TABLE', 'local_');
Unfortunately, if you want to use the same standard TABLE_PREFIX that the rest of your board uses, then the instructions mysteriously :rolleyes: got themeselves into the wrong place. The statement:
define ('THIS_TABLE', TABLE_PREFIX);
has to come after including global.php, not before. Both scripts I supplied put these statements a few lines too soon. Just move the lines down a bit. I'll fix.
Images
As far as images are concerned, you can use all the available BBCodes in all the title and description fields for links and categories. So there's nothing to stop you including an IMG code to get a picture there if you want. Hoffi, maybe I'm missing what you mean?
Integration with the AdminCP
I really do understand why people want to see hack administration integrated with the main VB admincp. The problem is that this breaks a golden rule of developing beta code - don't interfere with things you shouldn't touch. This hack is essentially "clean" as far as VB is concerned - it dumps new tables into the database and new templates into your styles, but it doesn't change any of the VB release code, so there should be no problem in upgrading your VB. This is very important for our main VB application, which is a major business web site and has to be rock solid.
This hack's templates and code are written so that only your admins get the option to jump to and use the admin facilities. It is a trivial patch to include the link in your main adminCP - I just haven't given it yet because it hasn't been a priority for me.
Updated code
I reposted the 0.95 zip last night to fix a couple of the reported problems (table index for efficiency, ability to install in versions pre-RC4. The table prefix bug correction described above isn't yet there - if I have time this evening, I'll deal with it.
allan grossman
02-18-2004, 08:41 AM
Installed without a hitch. Thanks!
13th_Disciple
02-18-2004, 05:12 PM
after messing with the links directory for awhile now, i see no real reason to put it in the adminCP of vbulletin.. it's actually nice being able to "admin in place" so to speak..
i do need to upgrade to .95 though and see what kind of differences there are now.. haven't had much time lately..
AndrewD
02-18-2004, 05:58 PM
after messing with the links directory for awhile now, i see no real reason to put it in the adminCP of vbulletin.. it's actually nice being able to "admin in place" so to speak..
i do need to upgrade to .95 though and see what kind of differences there are now.. haven't had much time lately..
I've now uploaded 0.95 into post 1, with instructions on how you can integrate this with the VB admincp if you want to.
0.95 is really a continued tidying up. The only thing that remains to be done for 1.0 is moderation (and of course any more bugs you find...)
13th_Disciple
02-19-2004, 12:33 AM
Andrew, are you going to add any kind of links rating system? possibly even a comments section for each DL.. or.... is there a way to tie each DL into a forum maybe so users can comment in there.. maybe have it generate a thread once a link is created so users could comment on it.. then the "thread" could not only contain the users comments, but also a rating.. may add a bit of overhead to what you may have in mind.. not sure.. i thought you did mention before the possiblility of doing a rating deal though.. can't remember, and too tired to review the thread.. :(
AndrewD
02-19-2004, 03:10 AM
Andrew, are you going to add any kind of links rating system? possibly even a comments section for each DL.. or.... is there a way to tie each DL into a forum maybe so users can comment in there.. maybe have it generate a thread once a link is created so users could comment on it.. then the "thread" could not only contain the users comments, but also a rating.. may add a bit of overhead to what you may have in mind.. not sure.. i thought you did mention before the possiblility of doing a rating deal though.. can't remember, and too tired to review the thread.. :(
:lick: Ratings are there already - there's a permissions setting in the admin page called can_rate_link. Users in these usergroups get the opportunity to rate links on a 1-5 star basis, and the main links display will then show the average rating.
Links are tied to forums through the forumid. I'd primarily intended this as a way to establish viewing permissions, but it will work the other way round also. If you use the link
local_links.php?action=show&forum=nn
you'll get a list of the links associated with that forum. I'll think about how easily one could have an automatic "link to thread" jump, although perhaps not for v1.0.
GenSec
02-19-2004, 06:26 AM
When add new links it writes linkid=0 in local_linksltoc table.
And it needs multi-page listing.
AndrewD
02-22-2004, 01:52 PM
When add new links it writes linkid=0 in local_linksltoc table.
Really? Under what conditions?
And it needs multi-page listing.
I agree - sometime, someday...
thanks
Natch
02-22-2004, 08:39 PM
For those having trouble with my addon after this upgrade, note that you will need to re-install the template from the addon after the upgrade to 0.95 ...
???`S?LV?R???`
02-24-2004, 05:02 PM
lol I can't even begin to explain how much I needed a hack like this.... nice to see that it's released.
Mellow
02-26-2004, 11:14 AM
<Clicks INSTALL>
I love this, much cleaner than making forums/sub forums links. IMHO
Thanks!
???`S?LV?R???`
02-27-2004, 10:14 AM
Do you know around when this hack is gonna get a final version released?
AndrewD
02-27-2004, 10:48 AM
Do you know around when this hack is gonna get a final version released?
Ha, ha! There's never a final release - didn't you know?
I plan to move this to the full release forum either this weekend or next, and call it version 1.0. There will be no further new functionality, apart from a slight tidying up, and I shall include Natch's integration with VBIndex for those who want it.
There is a wish list - particularly moderation and mass import/export of links, which will be done sometime.
OK?
???`S?LV?R???`
02-27-2004, 11:21 AM
Sounds good, lol hopefully it's this weekend. This is a hack ive been requesting..etc for a while now since vb3 has been out.
raxafarian
02-27-2004, 12:35 PM
I added a space between the description and the 'added' info. Makes it a bit more readable.
in template links_linkbit:
change
$linkratebit
</span>
</td>
<td class="alt1">
<span class="smallfont">$linkdesc
[Added: $linkdate]
to
$linkratebit
</span>
</td>
<td class="alt1">
<span class="smallfont">$linkdesc
<br />
[Added: $linkdate]
EDIT: this only inserts a space if you have no description. How can we get a space between the description and the 'added' text when there is a description entered? (other than putting a hard return in each description box when entering links)
AndrewD
02-27-2004, 04:38 PM
I added a space between the description and the 'added' info. Makes it a bit more readable.
EDIT: this only inserts a space if you have no description. How can we get a space between the description and the 'added' text when there is a description entered? (other than putting a hard return in each description box when entering links)
I think the solution is to have a "table in a table" - it spreads things out a bit better than the break tag. I'll play around and see what it looks like. One point, though, is that I haven't coded multiple page handling, so all the links in one category appear together. The more one opens up the template, the longer the page becomes.
???`S?LV?R???`
02-28-2004, 01:25 AM
Before I install this I gotta few questions that I wanna clear up... you can put permissions on the link itself right? rather than sticking the link somewhere on the forum and setting certain permissions to the view of the page. I remember vbportal had a downloads page and they could specify permissions on the files rather than just the page. So that's what im wondering about this, and if it does, does it have a file size limit? Cause i know when you cant add big files on VB attachments cause of the mysql limits..etc
raxafarian
02-28-2004, 01:47 AM
Before I install this I gotta few questions that I wanna clear up... you can put permissions on the link itself right? rather than sticking the link somewhere on the forum and setting certain permissions to the view of the page. I remember vbportal had a downloads page and they could specify permissions on the files rather than just the page. So that's what im wondering about this, and if it does, does it have a file size limit? Cause i know when you cant add big files on VB attachments cause of the mysql limits..etc
you specify a forum 'parent' for each link which determines the viewing permission.
???`S?LV?R???`
02-28-2004, 01:50 AM
but that wouldnt really protect the file, cause then people could just give out links still
AndrewD
02-28-2004, 06:14 AM
but that wouldnt really protect the file, cause then people could just give out links still
The permissions system works in two ways, both building on VB's usergroups:
a) Ability to "do" certain things. You set this in the admin pages, by defining which usergroups can create links, categories, etc. Only a user who is a member of one of the specified groups can carry out the specified task.
b) Ability to "view" things. When you create/edit a link or category, you "assign" a forumid to the link/category. This may be explicit or implicit - i.e. if the user has can_set_permissions (see previous item), then that user can choose which forum to assign to the link, otherwise the default choice set by the administrator is used.
Whenever one of your users views these pages, she will only see links and categories for which her usergroup has the appropriate forum permission. I.e. if that group can see and visit a particular forum, then she can see and visit links associated with that forum.
This also works when trying to download a file. These are set up as a call to local_links.php?action=jump&id=n. If someone tries to get round the system by simply choosing a random number (or if someone tells someone else what number to enter), the code still checks to see if that usergroup has the relevant permission, and refuses the download if not. The user never gets to see where the actual file is stored.
Of course, if someone actually knows where the file is really stored, and gives out that information, then it is perfectly possible to bypass the whole security system. But that is nothing to do with this hack.
Clear?
???`S?LV?R???`
02-28-2004, 08:00 AM
alright i understand all that... but what if they were on a custom page on vbindex, that rule wouldnt apply anymore right?
13th_Disciple
02-28-2004, 06:13 PM
pm a mod or admin and ask them to move it to the proper area of full release forums..
AndrewD
03-02-2004, 10:12 AM
This has now gone to full release 1.0 and moved to the main hack forum
Zhin Jio
03-02-2004, 08:23 PM
I'm having only one issue. It appears that any attempt to 'edit' an existing category automatically sets its catforum to 0. Since I'm not using forum based permissions, I'd like it to remain -999. I'm going to do some more looking around, but this creates some pretty odd behavior.
Otherwise, fantastic hack. I've been waiting for this one to appear. Install was smooth. I've made a slight mod to use to use 'star' images instead of a number rating, since I'm already using those star images on the page elsewhere, and they're cached. Nice and quick.
Installed.
- ZJ
trilOByte
03-02-2004, 11:11 PM
Excellent Hack - fantastic.
* trilOByte clicks install
One problem though, I inseted a category as a sub category, when I wanted it as a parent. I tried to move it and got a nopermission error (I'm primary admin, group 6), every attempt to acces thereafter and I get nopermission (I have permissions set to a -ve value). I deleted the category (catid = 3) using phpMyadmin (does only having catid's 1,2,4 cause a problem?) and everything else seems to work OK. I dont know why this happened, just thought I'd bring it to your attention.
Thanks for a great hack. :)
trilOByte
03-02-2004, 11:18 PM
I've made a slight mod to use to use 'star' images instead of a number rating, since I'm already using those star images on the page elsewhere, and they're cached. Nice and quick.
Installed.
- ZJ
What's that mod? I'd like to do that myself. ;)
trilOByte
03-02-2004, 11:57 PM
Oops, fairly big problem - relating to my post on the previous page. If I attempt to edit any of the categories, I get a nopermission error and the category vanishes from the listing. I cant access the category thereafter. It shows in the statistics, but that is the only place I can see evidence of it's existance - aside from the dB itself.
As I said before, I'm primary admin, userid = 1, usergroup = 6. Changing permissions from a -ve value to +ve and specifying forums, makes no difference.
AndrewD
03-03-2004, 04:18 AM
Excellent Hack - fantastic.
* trilOByte clicks install
One problem though, I inseted a category as a sub category, when I wanted it as a parent. I tried to move it and got a nopermission error (I'm primary admin, group 6), every attempt to acces thereafter and I get nopermission (I have permissions set to a -ve value). I deleted the category (catid = 3) using phpMyadmin (does only having catid's 1,2,4 cause a problem?) and everything else seems to work OK. I dont know why this happened, just thought I'd bring it to your attention.
Thanks for a great hack. :)
OK, I'll try to track this down - there's a couple of people finding that something goes wrong with editing categories. Thanks.
Natch
03-03-2004, 04:53 AM
alright i understand all that... but what if they were on a custom page on vbindex, that rule wouldnt apply anymore right?
The links will display on the vBIndex front page with my addon regardless of permissions, but if a user does not have permission to download, then the link will point to a standard vB "No Permissions" page ...
Zhin Jio
03-03-2004, 06:02 AM
What's that mod? I'd like to do that myself. ;)
Two steps: In the 'ratebit' template, change:<br /><span class="smallfont">rated <b>$linkrate</b> star</span>to:<br /><span class="smallfont">rated: $linkrate</span>
Then, in the local_links.php file, find:
if (isset($links_totrate[$linkid])) {
$linkrate = round($links_totrate[$linkid] / $links_numrate[$linkid]);
eval("\$linkratebit = \"".fetch_template('links_ratebit')."\";");
and change it to:
if (isset($links_totrate[$linkid])) {
$lr = round($links_totrate[$linkid] / $links_numrate[$linkid]);
$linkrate = "";
$i = 0;
while ( $i < $lr ) {
$linkrate = $linkrate . '<img src="http://pebkac.trippy.org/forums/images/stars/level1.gif"> ';
$i++;
}
eval("\$linkratebit = \"".fetch_template('links_ratebit')."\";");
Obviously, use your own URL to the star image. This isn't fancy, but it works. Hope that helps...
- ZJ
Zhin Jio
03-03-2004, 06:04 AM
OK, I'll try to track this down - there's a couple of people finding that something goes wrong with editing categories. Thanks.
Yeah, I went as far as finding that this changed the catforum to '0', but not *why* it was doing this. Thanks for looking into this. It seems to apply to making *any* edit to a category... primary/secondary descriptions, parent, etc.
I did look in the code. There was a variable 'pforum' that is being saved to the catforum column in the db. Is that right variable? Was it initialized?
I'll butt out now *grin*....
- ZJ
Zhin Jio
03-03-2004, 06:09 AM
Oops, fairly big problem - relating to my post on the previous page. If I attempt to edit any of the categories, I get a nopermission error and the category vanishes from the listing. I cant access the category thereafter. It shows in the statistics, but that is the only place I can see evidence of it's existance - aside from the dB itself.
As I said before, I'm primary admin, userid = 1, usergroup = 6. Changing permissions from a -ve value to +ve and specifying forums, makes no difference.
If you can play in the db, and want a temporary fix until Andrew comes up with a real one... do something like:
UPDATE local_linkscat SET catforum=-999 WHERE catforum=0;
YMMV.
- ZJ
AndrewD
03-03-2004, 06:22 AM
If you can play in the db, and want a temporary fix until Andrew comes up with a real one... do something like:
UPDATE local_linkscat SET catforum=-999 WHERE catforum=0;
YMMV.
- ZJ
I think I see where the problem lies, but it will have to wait until I get home from work to test and fix. Sorry, guys!
Raimund
03-03-2004, 08:34 AM
great hack! install worked flawless!
is there an easy way to import links from a text file?
AndrewD
03-03-2004, 05:56 PM
great hack! install worked flawless!
is there an easy way to import links from a text file?
No, but there should be! What format do you keep your links in?
trilOByte
03-03-2004, 06:26 PM
Andrew, I ran Zhin Jio's query and uploaded your new php file, my vanished categories reappeared and it would appear I can now edit them without problems.
You're a star. Thanks to you and Zhin Jio for the speedy fix (and thanks ZJ for the stars mod).
Cheers,
Great hack Anderw. ;)
Zhin Jio
03-03-2004, 08:40 PM
You're a star. Thanks to you and Zhin Jio for the speedy fix (and thanks ZJ for the stars mod).
Happy to help...
- ZJ
Chrissicom
03-04-2004, 10:13 PM
Uhm sorry for the stupid question but in what way is this hack a file database?!?!?! I can only see a links database when I install it. I would be looking for a file database where I can add movies, with a screenshot, movie info etc.
raxafarian
03-04-2004, 11:47 PM
Uhm sorry for the stupid question but in what way is this hack a file database?!?!?! I can only see a links database when I install it. I would be looking for a file database where I can add movies, with a screenshot, movie info etc.
If you put a link to a file, then when clicked, the file will be downloaded. You can use vb code for images.
???`S?LV?R???`
03-06-2004, 07:04 AM
I'm somewhat confused.. lol I think it's more so that I'm tired. i keep getting this message when i try to add a link "(not available)" can someone post a screenshot of an already setup setting for the added link so i can compare it with mine.
AndrewD
03-06-2004, 07:45 AM
I'm somewhat confused.. lol I think it's more so that I'm tired. i keep getting this message when i try to add a link "(not available)" can someone post a screenshot of an already setup setting for the added link so i can compare it with mine.
How about posting exactly the string that you are entering into the url box? It should look something like the following
http://www.bbc.co.uk
The "not available" message means that the script has tried to access the URL you specified and has failed.
???`S?LV?R???`
03-06-2004, 07:47 AM
In the url box i just put the source of the file right? http://www.example.com/test/example.mp3
AndrewD
03-06-2004, 08:02 AM
In the url box i just put the source of the file right? http://www.example.com/test/example.mp3
Should work fine - sure there are no spaces or something in your filename? I just tried this with an mp3 and everything was ok.
Give me the link to an mp3 on your site and I'll try to link to it.
AndrewD
03-06-2004, 08:05 AM
I have fixed the category bugs reported earlier this week. Please reinstall, as there is also a template fix.
To confirm - if you had left the default permissions forumid as -999 and you edited a category without selecting another forum, then the category would disappear into the big blue yonder.
If you have encountered this problem, you can repair it by running the sql query given by Zhin Jio.
UPDATE local_linkscat SET catforum=-999 WHERE catforum=0;
AndrewD
03-06-2004, 08:19 AM
In the url box i just put the source of the file right? http://www.example.com/test/example.mp3
Another thought - what web server software are you using? If you refer to a file on your local server (i.e. skip the http: stuff), then my code looks for a file somewhere below $_SERVER["DOCUMENT_ROOT"]. I think this should be set with a correctly configured server.
???`S?LV?R???`
03-06-2004, 09:18 AM
im confused what you mean andrew..
AndrewD
03-06-2004, 09:19 AM
im confused what you mean andrew..
Your forum is hosted on a site that runs a certain type of web server. Do you know what the server software is? e.g. is is Apache, etc?
???`S?LV?R???`
03-06-2004, 09:21 AM
apache
AndrewD
03-06-2004, 09:39 AM
apache
OK, then can you give me the *exact* file name you were putting into the URL box?
???`S?LV?R???`
03-06-2004, 09:41 AM
asksd.mp3
AndrewD
03-06-2004, 10:01 AM
asksd.mp3
OK, there is a bug in my code, but there are two ways round this.
1) Simply put either a forward slash in front of asksd.mp3, i.e /asksd.mp3, or use a full URL, i.e. http://yoursite/asksd.mp3
2) VB comes pre-configured to handle downloads of bmp, doc, gif, jpg, pdf, png, psd, txt and zip. To handle mp3, you have to go into your VBulletin AdminCP, and set up the proper mimetype for MP3 files. This is done under "Attachments". I'd have to check the right mimetype.
Your easiest option is probably (1) - can you try it and see. Can you also upload the attached file, tryit.php, onto your server, run it and let me know what it prints.
???`S?LV?R???`
03-06-2004, 10:16 AM
heh still saying that same thing.... i tried the first method. can you send me a screenshot of your configuration so i can campare it to mine though
AndrewD
03-06-2004, 10:24 AM
heh still saying that same thing.... i tried the first method. can you send me a screenshot of your configuration so i can compare it to mine though
I'm not sure what part of my configuration you want to see. The error message you are reporting is coming from a file check in local_links.php, which says that it can't find the file you have entered. I need to see the results of the script I uploaded a few minutes ago to see what's happening on your server.
Which directory have you uploaded the mp3 file into? Is it your forum directory?
???`S?LV?R???`
03-06-2004, 10:29 AM
nope not in my fourm directory, in a diff folder, and heres a lil screen of what im seeing.
AndrewD
03-06-2004, 10:37 AM
nope not in my fourm directory, in a diff folder, and heres a lil screen of what im seeing.
The screenshot is saying that the code can't find your file, i.e. it thinks that what you are entering in the URL box does not point to your mp3.
You either have to give a full URL pointing to that directory, or you have to give an absolute filename starting with a / and going down from your root directory. The code is trying to look for a file, starting from your root directory
i.e. if you have put the mp3 in a directory called music/files, then you should give as url http://yoursite/music/files/mp3file.mp3 or /music/files/mp3file.mp3
Are you sure you've entered all these correctly?
???`S?LV?R???`
03-06-2004, 10:42 AM
just tried this method "/music/files/mp3file.mp3" instead of the full url one now, and once i clicked submit it showed that it was working but then when i tired to click the link it gave me this message "Sorry - link does not seem to be available at present."
AndrewD
03-06-2004, 10:45 AM
just tried this method "/music/files/mp3file.mp3" instead of the full url one now, and once i clicked submit it showed that it was working but then when i tired to click the link it gave me this message "Sorry - link does not seem to be available at present."
I have to go out now for a while - I'll probably PM you something this evening to run so that I can see what is going on.
trilOByte
03-06-2004, 02:16 PM
Go to your adminCP
select "attachments" >> "Extensions & Sizes"
Select "Add new attachment type"
Extension = mp3
Max File size = (whatever you want)
Mime Type = Content-type: audio/x-mp3
If that doesnt work, try....
Content-type: audio/x-mpg
Content-type: audio/x-mpegurl
Content-type: audio/mpeg
more MIME types (http://www.duke.edu/websrv/file-extensions.html)
If that doesnt work, put anyimage.jpg in the same directory and try linking to that. This will tell you if it's something to do with the filetype, or server path/directory. Check the CHMOD for the folder make sure you have read permissions set. Post a direct link to the file on your forum somewhere and click on the link - does your browser download the file?.
HTH
???`S?LV?R???`
03-06-2004, 05:03 PM
audio/mpeg
is the proper one
trilOByte
03-06-2004, 06:21 PM
audio/mpeg
is the proper one
Did that fix your problem?
???`S?LV?R???`
03-06-2004, 06:31 PM
nope, still getting that unavailable message :(
AndrewD
03-07-2004, 04:48 AM
nope, still getting that unavailable message :(
Let's try the questions I asked earlier.
a) What is the full public URL, including your site name, to the file you are trying to make available? (send me this by PM if you don't want to let others know - I'm not interested in hacking your site)
b) What are the results of running the short script I posted for you to test.
The local_links code is not as helpful as it might be when it can't find a file, but I think it's working, and would like to get to the bottom of this before others have problems.
???`S?LV?R???`
03-07-2004, 07:20 AM
I'm thinking of just uninstalling this, cause im somewhat too busy to deal with the whole problem of trying to figure out the problem/fix it lol. But... I'm sure most of you have seen php-nuke and how it has a download section built into the script thats protected..etc. Well Hopefully someone will come out with one of those, cause that's exactly what i've been needing..
AndrewD
03-07-2004, 08:07 AM
I'm thinking of just uninstalling this, cause im somewhat too busy to deal with the whole problem of trying to figure out the problem/fix it lol. But... I'm sure most of you have seen php-nuke and how it has a download section built into the script thats protected..etc. Well Hopefully someone will come out with one of those, cause that's exactly what i've been needing..
That, of course, is entirely up to you, but then please don't expect people to spend time helping you. You're making half statements about what you want, and about what doesn't work, etc. Please take the time to follow these statements through.
???`S?LV?R???`
03-07-2004, 08:58 AM
That last thing about the php-nuke thing was just a similar topic about what would be nice to have, but the deal with this thing not working ive came through with my statements fine. Maybe not as details as you wish, but not too bad.
refertech
03-07-2004, 10:13 AM
Well I'll try to help solve the problem cause I'm having the same results. Doesnt matter if i use the full url or the /file/file.jpg method i still cant download the file. It either says file unavailable or its a broken link. Just tell me what you want me to do. :)
Thanks,
Mark
Edit: Results of the tryit.php file.
#/home/plmtech/public_html#
Ok, the link works fine when i try it with a image, but when i try it with a PDF file and I have added that extention to the extention list. It wont work. Must have something to do with extentions that are added. I know i can download pdf from my board cause i have posted them in threads and they download fine.
AndrewD
03-07-2004, 11:23 AM
Well I'll try to help solve the problem cause I'm having the same results. Doesnt matter if i use the full url or the /file/file.jpg method i still cant download the file. It either says file unavailable or its a broken link. Just tell me what you want me to do. :)
Thanks,
Mark
Edit: Results of the tryit.php file.
#/home/plmtech/public_html#
Ok, the link works fine when i try it with a image, but when i try it with a PDF file and I have added that extention to the extention list. It wont work. Must have something to do with extentions that are added. I know i can download pdf from my board cause i have posted them in threads and they download fine.
Thanks, Mark.
Pls upload the attached local_links.php. THis has a load of debugging statements in it. There's also a minor bug fix - if you had been providing files less than 1k in size, it would have reported that these were "not available".
Then a) try setting up a file that you think should work but gives you the "not available" message (Add link) & record the various debug messages that come up on the screen; then b) edit the file, make no changes, just submit, and record the messages again; finally, c) click on a link that has been set up correctly, which gives the broken link message, and record the message a third time. That should give me enough to go on.
Apologies for the hassle - so many differences between different systems.
refertech
03-07-2004, 11:41 AM
Step A results:
debug... url=#http://www.plmtech.com/downloads/carrier/alternative_refrigerants.pdf#
Array ( [scheme] => http [host] => www.plmtech.com [path] => /downloads/carrier/alternative_refrigerants.pdf )
remote, fopen ok
Entry added successfully and link checked ok
please record these messages then click here to continue
Step B results:
debug... url=#http://www.plmtech.com/downloads/carrier/alternative_refrigerants.pdf#
Array ( [scheme] => http [host] => www.plmtech.com [path] => /downloads/carrier/alternative_refrigerants.pdf )
remote, fopen ok
Entry edited successfully and link checked ok
please record these messages then click here to continue
Step C results:
debug... url=#http://www.plmtech.com/downloads/carrier/alternative_refrigerants.pdf#
Array ( [scheme] => http [host] => www.plmtech.com [path] => /downloads/carrier/alternative_refrigerants.pdf )
Known mimetype - fopen http://www.plmtech.com/downloads/carrier/alternative_refrigerants.pdf worked ok, so download should work properly
header Content-type: application/pdf
56 blocks read
Let me know if i can do more. You've done all the work here, i'm more than glad to help you perfect it or help me fix what i have done wrong. :)
Thanks,
Mark
If you prefer I'll give you and admin account on my board and you can take a look for yourself too. :)
refertech
03-07-2004, 11:53 AM
Ok, I think i figured it out. It has to do with the spaces in the file your trying to download. If the name of the file has a space it has the dead link problem. When i removed the spaces link works fine.
Mark
AndrewD
03-07-2004, 12:06 PM
Ok, I think i figured it out. It has to do with the spaces in the file your trying to download. If the name of the file has a space it has the dead link problem. When i removed the spaces link works fine.
Mark
Yes, you've sorted it out Mark, thanks. I'll have a look which is the best way to correct this - the official way is to turn spaces into %20's and so on.
refertech
03-07-2004, 12:12 PM
No problem man. Thanks for the hack man. This is great stuff and really is what i needed. Is there any way to make a new window open when someone clicks the link rather than open in the current window?
Thanks again,
Mark
AndrewD
03-07-2004, 12:32 PM
No problem man. Thanks for the hack man. This is great stuff and really is what i needed. Is there any way to make a new window open when someone clicks the link rather than open in the current window?
Thanks again,
Mark
It's set up to open the link in a window called "_new", which should be a new window. Under what circumstances are you finding that it's reusing the window? In any case, this is defined in the links_linkbit template - maybe you could try changing the target setting in that. Standard VB uses _blank. I understand that there may be problems with some popup blockers in using _blank.
refertech
03-07-2004, 01:02 PM
It reuses the existing window with all links that have I have tried but all i have tried is with a pdf or gif file. I'll check those templates but strange that it doesnt work like you indicated. I'm not using any pop up blocker so its not that.
Mark
refertech
03-07-2004, 01:09 PM
Great.
Changing it to _blank did the trick man.
Once someone does a rating on the link the file size disappears. Is there a way to keep that files size since most all of my links will be for downloads?
Ok, I know i just keep wanting more and more but i have to ask. Alot of my files are pdf files and since adobe uses that stupid browser plug-in to open pdf files inside the browser. I would give my right arm I could force the link to prompt to save the file rather than open it in there browser and i know the user can set his setting to do that but it would be much easier if i could make that happen on my side with having to get all those people to setup there preference correctly.
Mark
AndrewD
03-07-2004, 01:35 PM
Great.
Changing it to _blank did the trick man.
I'll make this change in the standard templates for the next release
Once someone does a rating on the link the file size disappears. Is there a way to keep that files size since most all of my links will be for downloads?
Doesn't do this for me - can you give a bit more detail? Alternatively, can you set up a page where the problem has occurred, use your browser to do a "show source" and then pm me the results.
Ok, I know i just keep wanting more and more but i have to ask. Alot of my files are pdf files and since adobe uses that stupid browser plug-in to open pdf files inside the browser. I would give my right arm I could force the link to prompt to save the file rather than open it in there browser and i know the user can set his setting to do that but it would be much easier if i could make that happen on my side with having to get all those people to setup there preference correctly.
This drives me spare as well. But I tried right clicking on the link and then selecting "save as" and it worked - didn't expect that but it was ok. At least this is what happens with IE6 - it didn't work with Mozilla Firebired
refertech
03-07-2004, 01:46 PM
PM sent.
Also see screen image.
???`S?LV?R???`
03-07-2004, 06:56 PM
that still doesnt explain why it didnt work for me when i didnt have any spaces lol
refertech
03-07-2004, 08:07 PM
Not sure AE. For me, I had same exact problem as you with space but no one problem with spaces removed.
AndrewD:
My other problem with the rating showing and the file size not showing was only with that one link and that link was made when i was having all of my other problems. But all others work fine so i just deleted that one and re-set it up and all is well now.
Thanks,
Mark
trilOByte
03-07-2004, 09:07 PM
that still doesnt explain why it didnt work for me when i didnt have any spaces lol
Is your links directory attached to a password protected or restricted access forum?
Rampag33
03-08-2004, 02:40 AM
This is close to what I needed but would like a counter for downloadable files. And admincp intergration would be better.
AndrewD
03-08-2004, 04:13 AM
This is close to what I needed but would like a counter for downloadable files. And admincp intergration would be better.
What do you mean by a counter? - there is a count of how often each link/file has been hit, i.e. downloaded if its a file - do you mean a count of how many entries are there in total?
As for integration with the admincp, the installation instructions explain how to do that. The reason I did not make this the default is that it will create an extra task whenever the good guys at VBulletin issue a new release.
AndrewD
03-08-2004, 04:17 AM
Not sure AE. For me, I had same exact problem as you with space but no one problem with spaces removed.
AndrewD:
My other problem with the rating showing and the file size not showing was only with that one link and that link was made when i was having all of my other problems. But all others work fine so i just deleted that one and re-set it up and all is well now.
Thanks,
Mark
Mark, I had wondered. Downloads only show a size if the code thinks the file is on the local host and so can use a stat() call to get file details. For remote files, you would have to read the file completely in order to find how big they are, so the size check is skipped.
Meltingfire
03-09-2004, 12:51 AM
Mark, I had wondered. Downloads only show a size if the code thinks the file is on the local host and so can use a stat() call to get file details. For remote files, you would have to read the file completely in order to find how big they are, so the size check is skipped.
Installed this hack yesterday, have founds some bugs.
The first bug is that you dont use THIS_SCRIPT to often, in the install-script you have alot of the links containing local_ for "next step", "run step 1", etc in the HTML, also, one of the queries, "ALTER TABLE local_linksltoc ADD INDEX ( linkid ) " will give an error if you dont change it to use THIS_SCRIPT.
The second thing i dont like is that the Forum-Jump dropdown is placed at the top right of the links pages when it should be at the left bottom as on every other page?
AndrewD
03-09-2004, 04:27 AM
Installed this hack yesterday, have founds some bugs.
The first bug is that you dont use THIS_SCRIPT to often, in the install-script you have alot of the links containing local_ for "next step", "run step 1", etc in the HTML, also, one of the queries, "ALTER TABLE local_linksltoc ADD INDEX ( linkid ) " will give an error if you dont change it to use THIS_SCRIPT.
The second thing i dont like is that the Forum-Jump dropdown is placed at the top right of the links pages when it should be at the left bottom as on every other page?
Thanks. The install script seems to have one missing table prefix, on linksltoc - the rest are script names, which I will parameterise but should not cause errors unless you deliberately rename the script.
The placement of the forum jump dropdown is, as they say, a feature :devious:. We put it in that position consistently on our main board because we found people were not spotting it down the bottom of the page. Just edit the linksheader template and put it where you want.
Mickie D
03-09-2004, 03:53 PM
working great for me now :)
thanks very much
is there any chance of having an upload feature so my members can upload files and use this just as a downloads section ?
Regards
Mickie
AndrewD
03-09-2004, 05:05 PM
working great for me now :)
thanks very much
is there any chance of having an upload feature so my members can upload files and use this just as a downloads section ?
Regards
Mickie
Mickie, glad things are working fine.
As for uploads/downloads, I leave that for someone else to sort out. The security issues seem pretty horrendous to me, and we don't allow our users to upload onto our site. Perhps this should be handled as some sort of tie in with the new VB attachments system?
Morrus
03-09-2004, 05:36 PM
Mickie, glad things are working fine.
As for uploads/downloads, I leave that for someone else to sort out. The security issues seem pretty horrendous to me, and we don't allow our users to upload onto our site. Perhps this should be handled as some sort of tie in with the new VB attachments system?
Just had a problem.
This has been working fine for me for a while now, but suddenly today the system has flagged *every* link (200+ of them) as broken. Any thoughts on why it might do this?
AndrewD
03-09-2004, 05:53 PM
Just had a problem.
This has been working fine for me for a while now, but suddenly today the system has flagged *every* link (200+ of them) as broken. Any thoughts on why it might do this?
Have you just done a revalidation via the admin page, or is this spontaneous? And are your links on or off your site?
The "validate" procedure tries to open a connection to all your links. If the call fails (timeout, etc), then the link is flagged as unavailable.
Perhaps you could pm me or post one of the apparently bad links? I'll try to see iof anything obvious is going on.
refertech
03-09-2004, 07:02 PM
AndrewD do you have any idea on how that add on hack works that Natch wrote do you. He must be on vacation cause I'm having a few problems and he in hiding. If not i understand and i know i probably shouldnt be asking for this here.
Mark
Natch
03-09-2004, 08:06 PM
I stop visiting the board for 3 days and I'm in hiding ?
The problem you are having (unless I'm mistaken) is assocaited with the links not pointing to files that exist ...
swanienufan
03-09-2004, 11:19 PM
First off, I want to say GREAT hack, super easy installation worked great!
Is there a way to set the display order of the categories or links? Didn't know if I was missing something. I went back and looked through most of the messages and couldn't find anything on this. If not available now, is this something that might be added in future releases?
Thanks for your work on this.
G
dirtymerc
03-10-2004, 02:11 AM
I did a small file edit to put the search in the main page, check it out, if your interested to know how i did it, ill post it up here:
http://www.offthetopic.com/forums/local_links.php?action=links
AndrewD
03-10-2004, 04:05 AM
First off, I want to say GREAT hack, super easy installation worked great!
Is there a way to set the display order of the categories or links? Didn't know if I was missing something. I went back and looked through most of the messages and couldn't find anything on this. If not available now, is this something that might be added in future releases?
Thanks for your work on this.
G
Thanks. You're right.
Currently, the categories and the links are pulled out of the database in alphabetical order. There's no facility yet to change that. (There's no code yet, either, to break up the lists into pages.)
What sort options would you like to see? These haven't been priorities for me, and the risk is always that extensions introduce new bugs, but I'm happy to think about the problem.
AndrewD
03-10-2004, 04:08 AM
I did a small file edit to put the search in the main page, check it out, if your interested to know how i did it, ill post it up here:
http://www.offthetopic.com/forums/local_links.php?action=links
Looks nice - just interested to know, why do you prefer having the search box visible rather than just using the drop down from the links menu bar? Or are you using a browser that doesn't handle the pop up correctly? (Or maybe I screwed up the coding for your browser :tired: - the pop up works find for me on your site with IE6 and Mozilla Firefox)
joeychgo
03-10-2004, 05:32 AM
IM thinking about installing this --- but I have a few questions first.. (im a 10 day old newbie so please be gentle)
First this part in the instructions confused me:
Integrating with your board
Use these links:
local_links.php?action=links : Browse the database at top level
local_links.php?action=links&catid=nn : Browse the database starting at category nn
local_links.php?action=search : Set up a search
local_links.php?action=jump&id=nn : Anti-leech jump to link/file nn, incrementing hit counter
local_links.php?action=admin : Admin control, including links validation (normally admins only)
local_links.php?action=logjumps&start=yyyy-mm-dd&end=yyyy-mm-dd : Admin access to
see who downloaded/jumped to what
local_links.php?action=cleanjumps&start=yyyy-mm-dd&end=yyyy-mm-dd : Admin access to
clear out log of who downloaded/jumped to what
local_links.php?action=show&forum=nn : Display entries associated with forum nn
local_links.php?action=show&check=0 : Display entries that failed the latest site validation
local_links.php?action=show&check=1 : Display entries that passed the latest site validation
local_links.php?action=show&check=-1 : Display those entries that are invalid
WHat am I suppose to do here?
Second, how do I get this to add a option to the navbar?
Third, is there a way to add the banner for the link?
Again, im new, I dont know html, and am just muddling my way along... :) thanks!
AndrewD
03-10-2004, 05:44 AM
IM thinking about installing this --- but I have a few questions first.. (im a 10 day old newbie so please be gentle)
First this part in the instructions confused me:
Integrating with your board
Use these links:
etc
WHat am I suppose to do here?
Second, how do I get this to add a option to the navbar?
Third, is there a way to add the banner for the link?
Again, im new, I dont know html, and am just muddling my way along... :) thanks!
I'm as gentle as they come - I also do a good job removing teeth :devious:
Basically, you only need to add one link to your navbar template to get access to this hack.
Go into the admincp, styles and templates, edit templates. Edit the navbar template.
Look for a line
<td class="vbmenu_control"><a href="faq.php?$session[sessionurl]">$vbphrase[faq]</a></td>
Add the following line immediately afterwards
<td class="vbmenu_control"><a href="local_links.php?$session[sessionurl]">Links</a></td>
Save. that should add a new item on your navbar that takes you straight into this hack. The other items I explain in the instructions give direct links to individual functions, but you can get at these via this link.
Adding a banner - I imagine you want an image to show up? What you have to do is work out where the image is stored. If you go into a site and right click on an image, then choose Properties, it will give you the full url. Simply put a standard IMG VBulletin BBCode into your link description pointing to that url.
joeychgo
03-10-2004, 06:03 AM
what about the first question?
AndrewD
03-10-2004, 06:05 AM
what about the first question?
You don't need to do anything about the first question unless you you want direct access to individual functions. The answer to the second question effectively answere the first. Try it and see!
Morrus
03-10-2004, 06:05 AM
Have you just done a revalidation via the admin page, or is this spontaneous? And are your links on or off your site?
The "validate" procedure tries to open a connection to all your links. If the call fails (timeout, etc), then the link is flagged as unavailable.
Perhaps you could pm me or post one of the apparently bad links? I'll try to see iof anything obvious is going on.
Yep, I did a revalidation.
There are 217 links on there right now (including my own site, which is definately available, otherwise I wouldn't be able to see the links page! :) )
I've checked the links maually - they all work OK. Here are a couple of examples which are marked as unavailable, but this is applying to all 217 of the links:
http://www.enworld.org (my own site, currently marked unavailable)
http://www.americanfolklore.net/
http://www.seankreynolds.com
It was odd. I revalidated, and it suddenly marked every single one as unavailable (came up as "failed" on the revalidation page). I've attached a screenshot.
AndrewD
03-10-2004, 06:10 AM
Yep, I did a revalidation.
There are 217 links on there right now (including my own site, which is definately available, otherwise I wouldn't be able to see the links page! :) )
I've checked the links maually - they all work OK. Here are a couple of examples which are marked as unavailable, but this is applying to all 217 of the links:
http://www.enworld.org (my own site, currently marked unavailable)
http://www.americanfolklore.net/
http://www.seankreynolds.com
It was odd. I revalidated, and it suddenly marked every single one as unavailable (came up as "failed" on the revalidation page). I've attached a screenshot.
As you say, strange. The links are certainly valid.
There can be problems with bad DNS connections. When you do the revalidate, does it immediately tell you that it can't find each link, or does it sit there for quite some seconds thinking about it?
joeychgo
03-10-2004, 06:21 AM
Ok, I uploaded the 3 files --
I turned my browser to local_links_install.php, then local_links.php?action=admin then local_links.php?action=links each time I got a blank white page --- ??? Now what? nothing else happened.
Also, there is a Templates directory in the zip file, what is that for?
Addemdum.... I installed the navbar link -- but when I click on it I get an error message which says :
Database error in vBulletin 3.0.0 Release Candidate 4:
Invalid SQL: SELECT * FROM local_linksadmin
mysql error: Table 'lincol14_forums.local_linksadmin' doesn't exist
mysql error number: 1146
Date: Wednesday 10th of March 2004 12:37:13 AM
Script: http://www.lincolnvscadillac.com/local_links.php?
Referer: http://www.lincolnvscadillac.com/
Username: Joeychgo
IP Address: 24.14.128.110
AndrewD
03-10-2004, 06:25 AM
Ok, I uploaded the 3 files --
I turned my browser to local_links_install.php, then local_links.php?action=admin then local_links.php?action=links each time I got a blank white page --- ??? Now what? nothing else happened.
Also, there is a Templates directory in the zip file, what is that for?
The templates directory is simply a set of text files containing the individual templates in the .xml file. You can ignore it unless you're interested.
The local_links_install.php should certainly not have given you a blank page. Are you sure you've put the three files into your forum directory?
It should take you through a series of installation steps, starting with table creation.
joeychgo
03-10-2004, 06:37 AM
I copied all 3 --- but got no installation sequence.
I installed the navbar link -- but when I click on it I get an error message which says :
Database error in vBulletin 3.0.0 Release Candidate 4:
Invalid SQL: SELECT * FROM local_linksadmin
mysql error: Table 'lincol14_forums.local_linksadmin' doesn't exist
mysql error number: 1146
Date: Wednesday 10th of March 2004 12:37:13 AM
Script: http://www.lincolnvscadillac.com/local_links.php?
Referer: http://www.lincolnvscadillac.com/
Username: Joeychgo
IP Address: 24.14.128.110
Morrus
03-10-2004, 06:40 AM
As you say, strange. The links are certainly valid.
There can be problems with bad DNS connections. When you do the revalidate, does it immediately tell you that it can't find each link, or does it sit there for quite some seconds thinking about it?
It's immediate. I barely had time to hit the "Print Screen" button to take that screenshot! :)
AndrewD
03-10-2004, 06:43 AM
It's immediate. I barely had time to hit the "Print Screen" button to take that screenshot! :)
OK, I'll think about it this evening. There's certainly a quick workaround, but I'd like to get to the bottom of this.
AndrewD
03-10-2004, 06:45 AM
I copied all 3 --- but got no installation sequence.
I installed the navbar link -- but when I click on it I get an error message which says :
Database error in vBulletin 3.0.0 Release Candidate 4:
Invalid SQL: SELECT * FROM local_linksadmin
mysql error: Table 'lincol14_forums.local_linksadmin' doesn't exist
Yes, this means that the install script hasn't been run, because the required tables don't exist. Just to be absolutely clear, have you pointed your browser at local_links_install.php?
If you want, create me an admin account and PM me the details.
Morrus
03-10-2004, 06:48 AM
OK, I'll think about it this evening. There's certainly a quick workaround, but I'd like to get to the bottom of this.
No problem - I can manage without for a day or so. :)
Natch
03-10-2004, 07:14 AM
joeychgo: you have to do more than just point your browser at the script local_links_install.php - you have to complete all the steps ...
joeychgo
03-10-2004, 07:16 AM
Thanks for all the help andrew. works great....
question -- is there a way to increase the font sizes?
AndrewD
03-10-2004, 07:37 AM
Thanks for all the help andrew. works great....
question -- is there a way to increase the font sizes?
Just take a look in the links_linkbit and links_catbit templates. Change "smallfont" to "normalfont" wherever you want to have things a bit bigger (or go into your main admin CP and redefine the smallfont style - green, flashing, 26point Comic Sans perhaps?!)
joeychgo
03-10-2004, 07:55 AM
lol tried the 26 in the smallfont...... no good.. made lots of things real big, but not the navbar links lol
Natch
03-10-2004, 09:44 AM
This is a hack dealing with the links and so on ... if you want to change the size of the navbar links, then change the CSS relating to the navbar links ... check out Style Manager, Main CSS
AndrewD
03-10-2004, 06:15 PM
No problem - I can manage without for a day or so. :)
ok, Morrus, can you try two things for me.
First, go into your admincp, go to Import and Maintenance, View PHP Info.
Tell me the version of php that you are running and tell me the two values given for the variable allow_url_fopen (should be quite close to the top of the section labelled PHP Core.
If allow_url_fopen is off, then we have the immediate answer to your problem. You need to check with your ISP to get this reconfigured as "on" in php.ini.
[edited out - this seems to have been the problem]
Morrus
03-10-2004, 07:38 PM
ok, Morrus, can you try two things for me.
First, go into your admincp, go to Import and Maintenance, View PHP Info.
Tell me the version of php that you are running and tell me the two values given for the variable allow_url_fopen (should be quite close to the top of the section labelled PHP Core.
If allow_url_fopen is off, then we have the immediate answer to your problem. You need to check with your ISP to get this reconfigured as "on" in php.ini.
Then, upload the attached (debug) version of local_links.php. Go into its admin page and revalidate. It will create a file debug.html in your main forum directory. I'd like a copy of that file (you can email it to ad_rodin@noos.fr)
Everyone else - please do not use this version of local_links - it is not intended for production use.
Okey dokey! Thanks so much for your help!
PHP version 2.3.4
allow_url_fopen is off in both columns, so it looks like we have found our problem. Weird, though - does this mean it turned itself off spontaneously, as the links were working previously.
I have a co-location server, so I'm going to need to make that php.ini change myself - is it something easy to to do?
Oh, and do you still need a copy of debug.html, now we've found this?
refertech
03-10-2004, 10:09 PM
I stop visiting the board for 3 days and I'm in hiding ?
The problem you are having (unless I'm mistaken) is assocaited with the links not pointing to files that exist ...
I didnt mean to be rude. Sorry if thats how it came out.
Mark
swanienufan
03-11-2004, 12:44 AM
Thanks. You're right.
Currently, the categories and the links are pulled out of the database in alphabetical order. There's no facility yet to change that. (There's no code yet, either, to break up the lists into pages.)
What sort options would you like to see? These haven't been priorities for me, and the risk is always that extensions introduce new bugs, but I'm happy to think about the problem.
I like the way VB handles the display order for forums. It can be a little time consuming for large numbers of forums but it makes it very user configurable. I know in PhotoPost when you move a category up in the list it automatically renumbers all categories below it, it would be nice if it could do that, but not necessary.
I also like your idea about breaking up the lists into several pages, your program has huge potential, keep up the good work on this.
AndrewD
03-11-2004, 04:23 AM
Okey dokey! Thanks so much for your help!
PHP version 2.3.4
allow_url_fopen is off in both columns, so it looks like we have found our problem. Weird, though - does this mean it turned itself off spontaneously, as the links were working previously.
I have a co-location server, so I'm going to need to make that php.ini change myself - is it something easy to to do?
Oh, and do you still need a copy of debug.html, now we've found this?
No, I don't need the debug file!
I assume you mean PHP 4.3.2 not 2.3.4!
Find the following lines in your php.ini - I've no idea where it will be on your server.
;;;;;;;;;;;;;;;;;;
; Fopen wrappers ;
;;;;;;;;;;;;;;;;;;
; Whether to allow the treatment of URLs (like http:// or ftp://) as files.
allow_url_fopen = On
Off = not allowed, On= allowed.
Quite possibly a new version of php was installed?
Morrus
03-11-2004, 02:25 PM
Thanks, Andrew. I've made that change.
However, another problem has cropped up. When clicking on "Revalidate", browsers have now started trying to download the file rather than execute it.
I decided to try upgrading to 1.0 (I was on 0.95), and local_links_install.php does the same thing - won't open in the browser, just tried to download it. If I permit the download, the resultant text file appears to be garbage:
? ?T?n?0}N???^????
KE??P??=???BmI???F?)%X???"Q????`4?ߵE?+???z?[,.???m??T???B???4???C???????O+??pr8?_???i1*E ????W?^-?w??J?ڒ)?N???V~??x??ѝ8a?h?+?v?^VdqB??C+?!?v %?ޘ???????o?BĬ?V??I??{?8???t?c?w?F???f'*/qqqr?e1b<?Hä?2?9?`?獅??
?O??ʊ<L'Y??e???8#b?GC????^Z*{?-?#??*D???R+`iu?ŵԽ???ü?B?~v?6?d?)HJ{p?1?? ??`B$?8???he}??
B?Č"Ș??W@??P?0?nf?h,.?I?+??3I?~?81????ΧI??(<????!OE??k?%ks/????8N??? з???@_?4??"?????*!??yr??1)>j?~`7?̞???
?????!?Jz?????N:??1????V?jD???%^TK'?#V??v?y????'!????L4)?7$?J (VL?@?^+???QF?[?=??G#?FU??z ??b7?d!4E=1??o9???z?+?D???:?(??喑ற???#??ڎ?;#"?J?L?
?q???l?D????;???V^?T?3ڎ2???"??l?}0? ?? 5^?k?
Any thoughts?
AndrewD
03-11-2004, 02:29 PM
Thanks, Andrew. I've made that change.
However, another problem has cropped up. When clicking on "Revalidate", browsers have now started trying to download the file rather than execute it.
I decided to try upgrading to 1.0 (I was on 0.95), and local_links_install.php does the same thing - won't open in the browser, just tried to download it. If I permit the download, the resultant text file appears to be garbage:
Any thoughts?
Ouch!
First question - does any php script now run? If not, then your php installation is corrupt. Are you sure you've only changed the one line in php.ini?
If yes, how much of the standard VB s/w works and how much of my hack works?
Morrus
03-11-2004, 03:55 PM
Ouch!
First question - does any php script now run? If not, then your php installation is corrupt. Are you sure you've only changed the one line in php.ini?
If yes, how much of the standard VB s/w works and how much of my hack works?
Yep, vBulletin is working just fine.
This was happening before I changed the php.ini file, so it's not connected to that (it started last night).
Can't really tell how well the rest of the hack is working because, with half an upgrade to 1.0 done, I can't test it! :)
AndrewD
03-11-2004, 04:18 PM
Yep, vBulletin is working just fine.
This was happening before I changed the php.ini file, so it's not connected to that (it started last night).
Can't really tell how well the rest of the hack is working because, with half an upgrade to 1.0 done, I can't test it! :)
Would you mind setting me up as an admin on your board and PM me the account and password, so that I can take a look?
Morrus
03-11-2004, 04:37 PM
Would you mind setting me up as an admin on your board and PM me the account and password, so that I can take a look?
Not to worry - got it fixed! I'll ask the guy who did it what the problem was and let you know, just in case someone else has the same issue! :)
Thanks for your help!
AndrewD
03-11-2004, 04:44 PM
Not to worry - got it fixed! I'll ask the guy who did it what the problem was and let you know, just in case someone else has the same issue! :)
Thanks for your help!
No problem, am interested to know what went wrong.
Morrus
03-11-2004, 04:47 PM
Here's what he said:
In php.ini I changed the line
zlib.output_compression = On
to
zlib.output_compression = Off
Earlier when I was in there I had changed it too on (it was off). In the past I have found better performance from php websites having it on.
If the website does zlib compression as well it can cause problems. Most sites check to see if php has it on to avoid the problem, but it seems the link software doesn't.
So that was the (second) issue. The first, as you surmised was the allow_url_fopen. Don't know if that's any help to you (or anyone else who might end up in this situation).
AndrewD
03-13-2004, 04:54 AM
Here's what he said:
So that was the (second) issue. The first, as you surmised was the allow_url_fopen. Don't know if that's any help to you (or anyone else who might end up in this situation).
Morrus, the documentation on zlib compression is distinctly cryptic in this respect, so I asked for help and did not get a relevant answer. But...
[New version of local_links.php attached for testing - now removed]
97cobracpe
03-16-2004, 10:49 PM
Installed without problems. Great Hack!
One suggestion, when I added a link for a video, it simply opened it up. I'd rather have it bring up the prompt to open or download first. Kinda like when you right click, save as. Is this possible? Maybe through the mime type?
refertech
03-16-2004, 11:21 PM
We have talked about this before because i had the same problem with pdf and xls files on my board but if there's a way none of us have been able to figure it out just yet.
Mark
Natch
03-17-2004, 02:11 AM
This issue can be resolved thru correct config of your mime types ON YOUR SERVER ...
However, if this is not possible for you, the PHP file headers can be used to modify the behaviour of downloads - this would require a new class to be added to detect the filetype (based on the extension) and apply the appropriate headers to the download link based on that ...
refertech
03-17-2004, 05:34 PM
thats over my head but ill work on it and see what i can come up with.
Thanks Natch.
Mark
97cobracpe
03-17-2004, 08:22 PM
This issue can be resolved thru correct config of your mime types ON YOUR SERVER ...
However, if this is not possible for you, the PHP file headers can be used to modify the behaviour of downloads - this would require a new class to be added to detect the filetype (based on the extension) and apply the appropriate headers to the download link based on that ...
I am interested in this. I run the server I'm on, so I have the capabities to make changes. Please, explain a little further :).
refertech
03-17-2004, 11:40 PM
After some checking, I can also set my mime types on my server as well but I'm to unfamilar with how to do this so any adviced would be appreciated.
Thanks,
Mark
FleaBag
03-18-2004, 11:32 AM
Got this installed with ease - an excellent system. Thank you.
JohnXWA
03-21-2004, 05:37 PM
Now VB3 is gold, is there a chance of AdminCP intergration?
Thanks!
AndrewD
03-22-2004, 04:28 AM
Now VB3 is gold, is there a chance of AdminCP intergration?
Thanks!
Guys, I keep answering this question! The instructions explain how to integrate with the AdminCp. It's a three line patch.
Is there a reason you want more?
BUG: (don't think this specific bug has been reported in the thread - I did search !)
in local_links_install.php, line 217, the line:
ALTER TABLE local_linksltoc ADD INDEX ( linkid )
should read:
ALTER TABLE ".THIS_TABLE."linksltoc ADD INDEX ( linkid )
Most people won't come across this problem since they wouldn't change the table prefix in THIS_TABLE.
BUG #2
$bbuserinfo is not defined in the routine get_linklistbit - which means that if you are not using forum permissions to determine who can do what, then the code to check whether the current user is allowed to edit their own post doesn't work.
The line which doesn't work is in the links_linkbit template (line 20):
<if condition="$links_permissions[can_edit_link] or $bbuserinfo[userid] == $linkuserid">
and the problem can be fixed simply by declaring $bbuserinfo as global in the get_linklistbit routine in local_links.php - ie. somewhere around line 385 add the following:
global $bbuserinfo;
Works now :D
AndrewD
03-23-2004, 04:12 AM
BUG #2
$bbuserinfo is not defined in the routine get_linklistbit - which means that if you are not using forum permissions to determine who can do what, then the code to check whether the current user is allowed to edit their own post doesn't work.
The line which doesn't work is in the links_linkbit template (line 20):
<if condition="$links_permissions[can_edit_link] or $bbuserinfo[userid] == $linkuserid">
and the problem can be fixed simply by declaring $bbuserinfo as global in the get_linklistbit routine in local_links.php - ie. somewhere around line 385 add the following:
global $bbuserinfo;
Works now :D
Thanks, Sim.
Your first bug was reported a couple of weeks ago and is fixed in my development version - I was waiting on confirmation on the fix to another bug before releasing. Your second report is new to me, so I'll include in release 1.01, probably this weekend.
martinh4
03-23-2004, 02:01 PM
Got this installed with ease - an excellent system. Thank you.
I agree, very easy install. :)
Chrissicom
03-24-2004, 08:59 AM
This is what we needed. Several things:
- not integrated with the admin cp is no good - you need to integrate it, it's the most important part
- we could make the design together - and we could cooperate with other download zone vb2 hackers to unite the code and make it even better.
Is this available for vB 3 Gold ?
AndrewD
03-24-2004, 09:01 AM
Is this available for vB 3 Gold ?
This works fine with vb3 gold
Chrissicom
03-24-2004, 09:02 AM
This works fine with vb3 gold
Yes I know the Links Database works but that is not what I need... I was asking about the File Database with all the data given there with screenshots in the 3rd or 4th post of this thread, that doesn't work with this hack apparently
vBulletin® v3.8.12 by vBS, Copyright ©2000-2024, vBulletin Solutions Inc.