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)

Spinball 09-24-2004 06:32 AM

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

AndrewD 09-24-2004 06:58 AM

Quote:

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

Thanks for your kind remarks.

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

Spinball 09-26-2004 06:40 AM

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

AndrewD 09-26-2004 11:12 AM

Quote:

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

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

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

Spinball 09-26-2004 11:28 AM

Email sent, thanks.

Spinball 09-27-2004 06:28 PM

I have found a small bug.
In the admin page listing of duplicate links, the links to the categories read as, for example:
HTML Code:

http://www.avforums.com/forums/local_links.php&catid=6
& instead of ?

AndrewD 09-28-2004 04:30 AM

Quote:

Originally Posted by Spinball
I have found a small bug.
In the admin page listing of duplicate links, the links to the categories read as, for example:
HTML Code:

http://www.avforums.com/forums/local_links.php&catid=6
& instead of ?


yep! thanks

Spinball 09-28-2004 11:41 AM

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

AndrewD 09-28-2004 03:35 PM

Quote:

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

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

Spinball 09-28-2004 03:52 PM

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

joeychgo 09-29-2004 09:01 AM

Andrew, I have a suggestion -

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

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

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

AndrewD 09-29-2004 03:31 PM

Quote:

Originally Posted by joeychgo
Andrew, I have a suggestion -

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

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

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

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

Spinball 10-03-2004 10:15 AM

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

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

greywolff 10-04-2004 09:36 PM

I am haveing one tiny problem

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

what did i miss ?

AndrewD 10-06-2004 02:52 PM

Quote:

Originally Posted by greywolff
I am haveing one tiny problem

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

what did i miss ?

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

Blam Forumz 10-07-2004 06:06 AM

You just got yourself an install ;)

Lionel 10-11-2004 08:05 PM

I plan to add an "extended description" in the add_link. How would I go, if there are no links, instead of displaying the error to display that?

AndrewD 10-12-2004 05:46 AM

Quote:

Originally Posted by Lionel
I plan to add an "extended description" in the add_link. How would I go, if there are no links, instead of displaying the error to display that?

Sorry, I'm not sure I quite understand.

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

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

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

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

Lionel 10-12-2004 12:39 PM

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

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

Blam Forumz 10-12-2004 02:32 PM

anyway to make user add files, but need an admin to validate them?

AndrewD 10-12-2004 04:25 PM

Quote:

Originally Posted by Blam Forumz
anyway to make user add files, but need an admin to validate them?

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

:)

AndrewD 10-12-2004 04:25 PM

Quote:

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

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

I'll think about this.

Lionel 10-12-2004 05:31 PM

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

Lionel 10-12-2004 09:12 PM

here is what I did so far:

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

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

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

with conditionals, I made

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

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

into

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

in order to create inhouse jumplink (the more link)

here is where I am fumbling

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

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

Blam Forumz 10-13-2004 05:21 AM

Error when i update my links option (who can view, etc)

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

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

Lionel 10-13-2004 06:27 AM

I did a nice little addition to rating
below:

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

I added:

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

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

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

greywolff 10-14-2004 04:31 AM

Quote:

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

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

Blam Forumz 10-14-2004 08:47 PM

Quote:

Originally Posted by Blam Forumz
Error when i update my links option (who can view, etc)


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

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

Bump :( Help

TheBurner 10-15-2004 05:01 AM

Nice Work :up:

I have the MOD installed on my forum.

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

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

No luck, it's still english...


What is the problem? Can anyone help me?

Sorry for my bad english.

AndrewD 10-15-2004 05:03 AM

Quote:

Originally Posted by TheBurner
Nice Work :up:

I have the MOD installed on my forum.

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

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

No luck, it's still english...


What is the problem? Can anyone help me?

Sorry for my bad english.

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

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

TheBurner 10-15-2004 05:07 AM

Quote:

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

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

Thanks :D

I'll try it out.

AndrewD 10-15-2004 05:21 AM

Quote:

Originally Posted by Blam Forumz
Bump :( Help

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

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

Blam Forumz 10-15-2004 03:37 PM

Quote:

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

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

erm.. could you explain that in english please :(

Holidazed 10-15-2004 03:46 PM

Quote:

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

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

I have no idea what this means. I do not have access to php.ini. I am getting a similar error.

Code:

Warning: opendir(): open_basedir restriction in effect. File(/forums/images/link-icons/) is not within the allowed path(s): (/path/to/my/lib/php:/usr/local/lib/php:/tmp) in /path/to/my/forums/local_links.php on line 2630
 
Warning: opendir(/pathtomy/forums/images/link-icons/): failed to open dir: Operation not permitted in /path/to/my/forums/local_links.php on line 2630
                                The following setting(s) are invalid
file_icons_dir : //forums/images/link-icons/

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

HELP!!

Lionel 10-15-2004 04:05 PM

Quote:

Originally Posted by AndrewD
I'll think about this.

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

AndrewD 10-15-2004 04:43 PM

Quote:

Originally Posted by bitg
I have no idea what this means. I do not have access to php.ini. I am getting a similar error.

Code:

Warning: opendir(): open_basedir restriction in effect. File(/forums/images/link-icons/) is not within the allowed path(s): (/path/to/my/lib/php:/usr/local/lib/php:/tmp) in /path/to/my/forums/local_links.php on line 2630
 
Warning: opendir(/pathtomy/forums/images/link-icons/): failed to open dir: Operation not permitted in /path/to/my/forums/local_links.php on line 2630
                                The following setting(s) are invalid
file_icons_dir : //forums/images/link-icons/

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

HELP!!

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

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

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

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

AndrewD 10-15-2004 04:43 PM

Quote:

Originally Posted by Blam Forumz
erm.. could you explain that in english please :(

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

AndrewD 10-15-2004 05:21 PM

Quote:

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

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

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

Holidazed 10-15-2004 05:43 PM

OK, I got my problem resolved. I went into the control panel for that m host provides and turned on directory listing for that folder.

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

Lionel 10-15-2004 06:53 PM

Thank you Andrew :up:


All times are GMT. The time now is 09:55 PM.

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

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02642 seconds
  • Memory Usage 1,865KB
  • 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
  • (2)bbcode_code_printable
  • (2)bbcode_html_printable
  • (20)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)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