vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Links and Files Database (https://vborg.vbsupport.ru/showthread.php?t=60403)

AndrewD 03-04-2005 05:54 AM

Quote:

Originally Posted by BioVader
Andrew, will I be able to update my version of links without losing my data? It's been a while since I've been on but I just haven't had any problems with the program. Yet I would like to use the new version without to much hassle... Just not sure what version I'm using.

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

The upgrade should be completely safe, but just to be sure, please back up your database (actually, just backup the tables called local_*) before starting.

Upload the files and rerun all steps in the installation script according to the instructions in the "instructions.txt" file in the zip. *Do not* tell it to uninstall - if you do that, you will lose everything.

Let me know if you experience any difficulties.

BioVader 03-04-2005 06:11 AM

K. I will prolly do it first thing after work.

Zain Jaffer 03-08-2005 08:22 PM

Is there a way to "search" the files in vbulletin links database, if not - will Andrew be kind enough to add it? :P ?

AndrewD 03-09-2005 04:14 AM

Quote:

Originally Posted by Zain Jaffer
Is there a way to "search" the files in vbulletin links database, if not - will Andrew be kind enough to add it? :P ?

Zain, are you wanting to search inside the files? Or just search the titles and descriptions - because that facility is already there?

havefun 03-17-2005 01:49 AM

thanks :) works fine for me.
(but i do not use download..)

CHIngs 03-19-2005 05:12 AM

you know how you can prevent double hits by disallowing hits for 60 seconds after being clicked. In a similar manner, how can I limit the number of downloads for a paticular amount of time after being click for the entire database?

Meaning, lets say I have file1.zip and file2.zip. I want to make sure that after the user clicks on file1.zip, he cant download file2.zip for another 60 seconds and vice versa. This must apply to ALL the files.

AndrewD 03-19-2005 07:41 AM

Quote:

Originally Posted by CHIngs
you know how you can prevent double hits by disallowing hits for 60 seconds after being clicked. In a similar manner, how can I limit the number of downloads for a paticular amount of time after being click for the entire database?

Meaning, lets say I have file1.zip and file2.zip. I want to make sure that after the user clicks on file1.zip, he cant download file2.zip for another 60 seconds and vice versa. This must apply to ALL the files.

I'll put this on the wishlist.
thanks

Lizard King 03-19-2005 12:04 PM

Andrew I have a question to you. Is it possible to change the look of links and file database like https://vborg.vbsupport.ru/attachmen...&stc=1&thumb=1 in some close future :) why i am asking this this can give a very good look to links and file database and i am not good with html :)

AndrewD 03-19-2005 12:22 PM

Quote:

Originally Posted by Lizard King
Andrew I have a question to you. Is it possible to change the look of links and file database like https://vborg.vbsupport.ru/attachmen...&stc=1&thumb=1 in some close future :) why i am asking this this can give a very good look to links and file database and i am not good with html :)

I think I could do something like this by adjusting one or two of the templates - I'm not very good at my Russian any longer - what do you want to have displayed in the box - name, star rating, image, username, size, number of downloads?

Lizard King 03-19-2005 12:31 PM

Quote:

Originally Posted by AndrewD
I think I could do something like this by adjusting one or two of the templates - I'm not very good at my Russian any longer - what do you want to have displayed in the box - name, star rating, image, username, size, number of downloads?

Yes exactly the sane information and maybe a small thumbnail just below the file name.

CHIngs 03-19-2005 03:37 PM

Quote:

Originally Posted by AndrewD
I'll put this on the wishlist.
thanks

thanx for considering it for future versions. But I was kinda looking for a instant solution. I just need some starters, like database table should be made and some starters. I know its very similar to how the hits work. I tried it and it was saving time and stuff in the database but it was not disallowing downloads if a user click on the links below 60 seconds. I think partly because the hits system works on PER-FILE basis, I was kinda trying making it work globally, for all files.

AndrewD 03-19-2005 04:09 PM

Quote:

Originally Posted by CHIngs
thanx for considering it for future versions. But I was kinda looking for a instant solution. I just need some starters, like database table should be made and some starters. I know its very similar to how the hits work. I tried it and it was saving time and stuff in the database but it was not disallowing downloads if a user click on the links below 60 seconds. I think partly because the hits system works on PER-FILE basis, I was kinda trying making it work globally, for all files.

What you've seen in the code is to disallow double recording of a hit in the database if the user clicks the same link twice in quick succession - I found that we were recording multiple hits if people got tired or were trigger happy.

If you're looking to prohibit multiple hits, then you have to put some similar code in another place. Go down to the lines that read
PHP Code:

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

    
$time TIMENOW;
    unset(
$url); 

and add something like:
PHP Code:

    $jumplink $DB_site->query("
        SELECT * FROM "
.THIS_TABLE."linksdownloads
        WHERE userid='
$userid
        ORDER BY usertime DESC
        LIMIT 1
        "
);
    while (
$jump=$DB_site->fetch_array($jumplink)) {
        if (
$time-$jump['usertime']) < YOUR_LIMIT) {
            eval(
print_standard_error('You will have to wait...',0));
            exit;
        }
        exit;
    } 


Slave 03-22-2005 02:48 PM

Hi Andrew .. :)

I think I've found a bug .. :p

I was in the process of adding a few more links to my site when I noticed something ..

I'd added 2 new links to the 2nd subcat within a main cat and when looking at the front page the subcat I'd added the links to was bold within the Description area .. but so were all the subcats after it in the same cat and I'd not added anything in those subcats. I clicked on the main cat link and the list of subcats were correct on that page with only the 2nd subcat showing bold as it should. I went back to the front page and all the others were still bold ..

Is there a missing close bold tag in the code?

Slave 03-22-2005 02:53 PM

Sussed it ..

In the links_subcatbit template the closing bold tag is < b > instead of < / b >

:)

AndrewD 03-22-2005 04:15 PM

Quote:

Originally Posted by Slave
Sussed it ..

In the links_subcatbit template the closing bold tag is < b > instead of < / b >

:)

Thanks...

havefun 03-22-2005 09:35 PM

thanks slave :)

CHIngs 03-26-2005 12:48 PM

Quote:

Originally Posted by AndrewD
What you've seen in the code is to disallow double recording of a hit in the database if the user clicks the same link twice in quick succession - I found that we were recording multiple hits if people got tired or were trigger happy.

If you're looking to prohibit multiple hits, then you have to put some similar code in another place. Go down to the lines that read
PHP Code:

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

    
$time TIMENOW;
    unset(
$url); 

and add something like:
PHP Code:

    $jumplink $DB_site->query("
        SELECT * FROM "
.THIS_TABLE."linksdownloads
        WHERE userid='
$userid
        ORDER BY usertime DESC
        LIMIT 1
        "
);
    while (
$jump=$DB_site->fetch_array($jumplink)) {
        if (
$time-$jump['usertime']) < YOUR_LIMIT) {
            eval(
print_standard_error('You will have to wait...',0));
            exit;
        }
        exit;
    } 


all that code is giving me is a BLANK page. I replaced YOUR_LIMIT with 60 for 60 seconds, that didnt work.

AndrewD 03-28-2005 09:32 AM

** 1.56 beta withdrawn ** We found a bug which hits only some users and produces invisible categories.

Attached, find the first beta for release 1.56. This is a 'tidying up' release, completing (I hope) the phrasing throughout the main and admin scripts. It also adds a few features that have been requested recently:

- (Slave) addlink script accepts optional url=, name=, description= parameters to allow scripted new link creation
- (Chings) optional admin timeout parameter added to prevent multiple hits in quick succession
- (Lizard King) two choices for the linkbit template, selected on the admin page. The new template uses a fieldset layout.

The main changes from 1.55b are in the admin script, giving better insight into category/forum associations and allowing you to download a csv file of hits when cleaning up the database. There are also two options for how category selection is handled within the addlink script (the existing pulldown menus and a fully expanded set of checkboxes).

The choice of template for linkbit and addlink are specified on the admin page.

I am separately uploading partially translated French and German xml phrase files. I'd be grateful if someone would go through these and translate the remaining English phrases (of course for any other languages too).

As always with a beta, bug reports appreciated

Lizard King 03-28-2005 03:48 PM

Upgraded from 1.55 to 1.56 and faced no problem. Everything is working good under 3.0.7 Thanks for the new layout Andrew

Slave 03-29-2005 10:12 AM

Just upgraded ..

I'm getting a mysql error when trying to get to the following link ..

http://www.domain.com/local_links_ad...set=categories (Category Structure)

Database error in vBulletin 3.0.3:

Invalid SQL:
SELECT forumid, forumpermissions
FROM forumpermission
WHERE usergroupid = 1
AND forumid IN()

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 ')' at line 4

mysql error number: 1064

Date: Tuesday 29th of March 2005 12:07:37 PM
Script: http://www.domain.com/local_links_ad...set=categories
Referer: http://www.domain.com/local_links_ad...set=statistics
Username: Slave

Slave 03-29-2005 10:43 AM

Just noticed that we seem to of got back the old bug of showing a link more than once in the "Some Random Links" section ..

Slave 03-29-2005 10:47 AM

Within the instructions.txt at 3.1.c ..

local_links_template.xml

should be ..

local_links_templates.xml

Slave 03-29-2005 10:51 AM

Another bug with the "Some Random Links" page ..

When a link has a "See also" section .. it's only showing one cat even when the link is linked to multiple cats ..

Slave 03-29-2005 11:33 AM

For those wanting to take advantage of the "addlink script accepts optional url=, name=, description= parameters to allow scripted new link creation" that AndrewD has kindly added .. I've found the following code to work with IE 6 ..

Code:

javascript:Q='';if(top.frames.length==0)Q=document.selection.createRange().text;void(btw=window.open('http://www.yoururl.com/local_links.php?action=addlink&url='+escape(location.href)+'&name='+document.title+'&description='+escape(Q),'AddToLinks','menubar=1,location=1,resizable=1,scrollbars=1,status=1,toolbar=1'));btw.focus();
(Be warned .. it looks like vB adds some spaces into the above code for some reason .. please cleck that you have no spaces before saying it doesn't work! :p)

Instructions for use ..

1/ Create a favorite within IE6 using any URL
2/ Right click this new favorite within the "Favorites" drop down and click "Properties"
3/ Within the "Web Document" tab replace the current URL with the code above remembering to change the "yoururl.com" part of the URL for the correct path to your local_links.php file
4/ Within the "General" tab replace the name to something like "Add URL to Link Database"
5/ Click OK, at which point it will ask if you really want to do it .. click YES
6/ Finally click "Tools" on your menu bar, click "Pop-up Blocker" and click "Turn off Pop-up Blocker". This will stop IE complaining that the site is trying to open a new window when you click "Add URL to Link Database" from your "Favorites" menu

To add a link to your Links Database you can now do the following ..

1/ Goto URL using IE6
2/ Highlight some text you'd like as the description for this link
3/ Pick "Add URL to Link Database" from your favorites list
4/ A new page will open pre-filling the Name, URL and Description of your link
5/ Finalise the completion of this page as normal

Finished! :)

AndrewD .. your more than welcome to use the above in the instructions.txt if you'd like .. or do some of your own if you think I've not explained it very well .. ;)

ShadowFun 03-30-2005 03:49 AM

When renewed to the version 1.56, I don`t see any my categories..
Only: Home & Add (Cat)

I can pass for link "action=links&catid=N", but a category is nonactive and I cann`t add links.

At addition of category the choice of Parent Category I don`t see any my categories also.

The options are proposed by default:
template_category_selection - links_addnewlink_catselect
template_linkbit - links_linkbit_table

How to correct ? :ermm:

Rgds.

welo 03-30-2005 11:08 AM

I just ran into a similar issue. Seems I missed the last couple of upgrades and after version 1.41 of this script, somehow the ability to define your own table prefixes disappeared and the installer insists on prefixing the tables as local_ so it just adds new blank tables if you were using another table prefix. I see no way to solve this without moving all the data around manually.

AndrewD 03-30-2005 12:06 PM

Quote:

Originally Posted by welo
I just ran into a similar issue. Seems I missed the last couple of upgrades and after version 1.41 of this script, somehow the ability to define your own table prefixes disappeared and the installer insists on prefixing the tables as local_ so it just adds new blank tables if you were using another table prefix. I see no way to solve this without moving all the data around manually.

Ouch - sorry guys - will check and provide a fix

ShadowFun 03-30-2005 12:12 PM

I think problem not on prefixing (i`m upgrading from version 1.55), but in something other...
Only where ? :)

AndrewD 03-30-2005 12:46 PM

Quote:

Originally Posted by Slave
Just upgraded ..

I'm getting a mysql error when trying to get to the following link ..

I think you'll find you associated a link or category with a forum, then deleted the forum. I'll fix the code so that it doesn't croak on this problem.

AndrewD 03-30-2005 12:49 PM

Quote:

Originally Posted by Slave
Another bug with the "Some Random Links" page ..

When a link has a "See also" section .. it's only showing one cat even when the link is linked to multiple cats ..

This is the same bug that caused multiple copies of the same random link to show up. Basically the "random hit" code isn't working properly when a link was in more than one category. (The "hottest hits" code was also broken, although less visibly.) Will upload a fix quite soon.

AndrewD 03-30-2005 12:56 PM

Quote:

Originally Posted by welo
I just ran into a similar issue. Seems I missed the last couple of upgrades and after version 1.41 of this script, somehow the ability to define your own table prefixes disappeared and the installer insists on prefixing the tables as local_ so it just adds new blank tables if you were using another table prefix. I see no way to solve this without moving all the data around manually.

Welo, I realise you may have missed something..

After version 1.41, I split the main code into several files. You must set the required table prefix in local_links_include.php (which goes into your include directory) and local_links_install.php (which goes into your admincp directory).

AndrewD 03-30-2005 01:03 PM

Quote:

Originally Posted by ShadowFun
I think problem not on prefixing (i`m upgrading from version 1.55), but in something other...
Only where ? :)

Did you re-run all the steps in the install script (Verify database, verify templates, verify phrases)?

If you did, please PM me details of your board + a username with admin privs, so that I can take a look.

ShadowFun 03-30-2005 01:19 PM

Ah sorry...but I`m test this on localhost..
No prob with vers. 1.55.. I add how many a lot of categories and links..
But when upgrade to 1.56 I can`t see any my categories :(

Clean installed 1.56 gives those errors... can`t see categories

AndrewD 03-30-2005 01:26 PM

Quote:

Originally Posted by ShadowFun
Ah sorry...but I`m test this on localhost..
No prob with vers. 1.55.. I add how many a lot of categories and links..
But when upgrade to 1.56 I can`t see any my categories :(

OK, can you backup the database tables called 'local_*' and email them to me - ad_rodin at noos.fr

I'll have a look here.

welo 03-30-2005 04:48 PM

Quote:

Originally Posted by AndrewD
Welo, I realise you may have missed something..

After version 1.41, I split the main code into several files. You must set the required table prefix in local_links_include.php (which goes into your include directory) and local_links_install.php (which goes into your admincp directory).

Indeed. I re-ran the setup while assigning my table prefix in local_links_install.php (and local_links_include.php) and put local_links_include.php into the proper directory, and everything now seems to be working as it should. My issue was compounded by stepping aside as admin at the beginning of the year and making a lateral move to a new admin usergroup, so I had to shuffle some data due to that so I could regain admin access.

About the only bug I'm encountering so far is when using Administer > Category Structure. Looks like you hardwired the ACP dir on line 343 of local_links_admin.php, so if someone has changed their ACP dir name for security reasons, then the links under Access Permissions won't work.

funfone 03-31-2005 06:48 PM

Quote:

Originally Posted by ShadowFun
When renewed to the version 1.56, I don`t see any my categories..
Only: Home & Add (Cat)

I can pass for link "action=links&catid=N", but a category is nonactive and I cann`t add links.

At addition of category the choice of Parent Category I don`t see any my categories also.

The options are proposed by default:
template_category_selection - links_addnewlink_catselect
template_linkbit - links_linkbit_table

How to correct ? :ermm:

Rgds.

I just installed and upgraded to latest version I too cant see any categories only if I type in manually each catid - and there is no way of adding in a link..

AndrewD 04-01-2005 03:20 AM

Quote:

Originally Posted by funfone
I just installed and upgraded to latest version I too cant see any categories only if I type in manually each catid - and there is no way of adding in a link..

OK, clearly something wierd going on - job for the weekend.

Funfone, is your board on a public web site - if so, can you pm me details plus an account with admin privs so that I can take a look.

Lizard King 04-01-2005 03:56 AM

Andrew is it possible to add a custom field for this modification for the new layout that a user can enter a url for a image and this field will auto resize the thumbnail for 100x100 px ? Or maybe get https://vborg.vbsupport.ru/showthread.php?t=73040 this mode work with this hack ? My members want to include small thumbnails so bad and i can't find a stable way to do it.

AndrewD 04-01-2005 04:01 AM

Quote:

Originally Posted by Lizard King
Andrew is it possible to add a custom field for this modification for the new layout that a user can enter a url for a image and this field will auto resize the thumbnail for 100x100 px ? Or maybe get https://vborg.vbsupport.ru/showthread.php?t=73040 this mode work with this hack ? My members want to include small thumbnails so bad and i can't find a stable way to do it.

I'll take a look this weekend - should be straightforward.

AndrewD 04-02-2005 05:29 AM

A couple of you (Funfone, Shadowfun) reported that you upgraded to beta 1.56 and can no longer see the categories you add/nor add any links.

I think the reason is that you did not re-run all the steps in the install/upgrade script. For this reason, some of the required templates and phrases are not available. Unfortunately, this means that any new categories that you add to your database are corrupt (to be precise, their parent is not being set properly).

You can fix the problem by re-running the install script and making sure you carry out all the steps as indicated. I will correct the installation script so that this problem is caught before it becomes a problem.


All times are GMT. The time now is 09:32 AM.

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

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02575 seconds
  • Memory Usage 1,877KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (4)bbcode_php_printable
  • (19)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

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

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