Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions

Reply
 
Thread Tools Display Modes
  #11  
Old 08-17-2004, 07:13 PM
58sniper 58sniper is offline
 
Join Date: Sep 2002
Posts: 127
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by CarCdr
Here are cases of on-site content that could be translated into more friendly looking/acting links in posts. I am not speaking of vbulletin.org here, just using it in these examples. The idea would be to have vBulletin itself translate the links in a more user-friendly way.


THREAD
https://vborg.vbsupport.ru/showthread.php?t=68129
https://vborg.vbsupport.ru/showthrea...0&page=2&pp=10
https://vborg.vbsupport.ru/showthrea...ght=size+limit

Automatically translates to something like
Subject of thread, Username


POST
http://www.vbulletin.com/forum/showt...046#post719046
https://vborg.vbsupport.ru/showthrea...mit#post540678
https://vborg.vbsupport.ru/showpost....06&postcount=1

Automatically translates to something like
Subject of post, Username


MEMBER
https://vborg.vbsupport.ru/member.php?u=4514

Automatically translates to something like
Member: Username


FORUM
http://www.vbulletin.com/forum/forumdisplay.php?f=55

Automatically translates to something like
Forum: Forumname

I really like that idea, and have wondered before if it was "doable". I find myself pasting links for FAQ items all the time, so I'll extend your example with:

FAQ
https://vborg.vbsupport.ru/faq.php?f...q_new_faq_item

becomes
FAQ: Showing up as unlicensed?
Reply With Quote
  #12  
Old 08-17-2004, 07:27 PM
Dean C's Avatar
Dean C Dean C is offline
 
Join Date: Jan 2002
Location: England
Posts: 9,071
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes but vBulletin hasn't got an AI of it's own. All this stuff would have to be manually coded in, and add to the bulk of the code. More regexp parsing when making posts, more overhead. It's not hard formatting your post to do what you said above you know
Reply With Quote
  #13  
Old 08-18-2004, 12:22 AM
CarCdr CarCdr is offline
 
Join Date: Apr 2004
Posts: 242
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Dean C
Yes but vBulletin hasn't got an AI of it's own. All this stuff would have to be manually coded in, and add to the bulk of the code. More regexp parsing when making posts, more overhead. It's not hard formatting your post to do what you said above you know
Dean, with respect, doing the sorts of things we are talking about is what computers do best, not humans. This ain't AI, it's really straightforward machine translation.

The overhead would be pretty insiginificant for the sorts of transformations we are talking about. The parsing overhead for this in a post display cycle is near zero. The only overhead worth considering is when a call to verify_id forces a query. Of course, there is no overhead if the post is in the post cache.

As for bulk, the implementation for parsing showthread/showpost references (e.g., Thread: Title extract... by CarCdr or Post: Title extract... by Dean C is probably 50 lines of code, a very small addition to the many thousands of lines run in a post/thread display cycle.

Cheers
Reply With Quote
  #14  
Old 08-18-2004, 12:33 AM
CarCdr CarCdr is offline
 
Join Date: Apr 2004
Posts: 242
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by 58sniper
I really like that idea, and have wondered before if it was "doable". I find myself pasting links for FAQ items all the time, so I'll extend your example with:

FAQ
https://vborg.vbsupport.ru/faq.php?f...q_new_faq_item

becomes
FAQ: Showing up as unlicensed?
Ahhh.... I never thought of FAQ references.

Oh, it's doable. Like I said, we are already testing on-site references for posts. The others are just very similar cases.
Reply With Quote
  #15  
Old 08-18-2004, 06:49 AM
Dean C's Avatar
Dean C Dean C is offline
 
Join Date: Jan 2002
Location: England
Posts: 9,071
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok so imagine the pseduo code:

PHP Code:
if(preg_match(someregexptomatchtheurltoanfaq))
{
do 
some exploding and get other parts of query string
check to see the url entry actually exists somewhere on the site 
<-- query
}
etc... 
I can't see a more efficient way of doing it other than having perhaps a cache of the FAQ entries, that'd be fine for that. But what happens with threads, you have 10 urls in a post, check in one of the caches you might be thinking? Ok, 10 urls to a calendar event, 10 queries?

The fact remains that when you are adding a thread there is going to be a lot of extra processing involved, and on large boards, it's not going to be worth it other than for the sake of a little extra SEO. Can you imagine how much extra server-processing would be involved on a site like OTC ?

I do think your ideas are good, as the more and more useful your link descriptions are, then the more search-engine friendly they are. So, as long as it's an option and highlighted that it may not be suitable for large boards, then it'll work ok (on small boards).
Reply With Quote
  #16  
Old 08-18-2004, 09:41 AM
CarCdr CarCdr is offline
 
Join Date: Apr 2004
Posts: 242
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Dean C, The implementation is simpler than you think...

I can not speak to the FAQ idea, as I have not looked into that one, but I can speak to thread and post links.

1. Late in the processing of the bbcode parser, all links are full (no relatives allowed). All one has to do to know if it is on-site content is check the prefix of the URL -- does it start with $vboptions[bburl]? (1 strpos call)

2. Now all one needs to do to know what type of link it is, is look at the script name. For example, a post link is either showthread or showpost.

3. For these post-type URL's, there must be a "postid" parameter. Simply pluck the id that follows the parameter. (2 and 3 are done with one preg_match call).

4. Now you can call verify_id to get the post/thread information.

5. Return the <a> tag. The original link itself is unchanged. All we are adding is a little text between <a> and </a>.

This only runs if the post is not in the post cache, since it runs at the same time that [ url] tags are processed. I assure you that the cost is insignificant for the normal case of a link in a post. Sure, if a post had many links in it, the processing could become significant.

The added PHP code is not even measurable next to the bbcode parser, which is very large and inefficient, both from a code and a mem allocation point of view.

ps: As for FAQ references, I would compromise and not go any further than taking the reference following '#' in the URL. This would be no overhead as it would only involved a simple string extraction from the URL. It would transform a link like this (spaces added below to avoid URL parse in this post):

[ url] h t t p://www. foo .com/faq.php?faq=vb_read_and_post#faq_vb_email_notifica tion[ /URL]

and transform it to a link that did not open a new window and looks like:

FAQ: vb_email_notification.
Reply With Quote
  #17  
Old 12-10-2004, 05:03 AM
alkatraz alkatraz is offline
 
Join Date: Oct 2002
Location: Vancouver, Canada
Posts: 384
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by CarCdr
Here are cases of on-site content that could be translated into more friendly looking/acting links in posts. I am not speaking of vbulletin.org here, just using it in these examples. The idea would be to have vBulletin itself translate the links in a more user-friendly way.


THREAD
https://vborg.vbsupport.ru/showthread.php?t=68129
https://vborg.vbsupport.ru/showthrea...0&page=2&pp=10
https://vborg.vbsupport.ru/showthrea...ght=size+limit

Automatically translates to something like
Subject of thread, Username


POST
http://www.vbulletin.com/forum/showt...046#post719046
https://vborg.vbsupport.ru/showthrea...mit#post540678
https://vborg.vbsupport.ru/showpost....06&postcount=1

Automatically translates to something like
Subject of post, Username


MEMBER
https://vborg.vbsupport.ru/member.php?u=4514

Automatically translates to something like
Member: Username


FORUM
http://www.vbulletin.com/forum/forumdisplay.php?f=55

Automatically translates to something like
Forum: Forumname
this would be SWEET!!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:41 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04485 seconds
  • Memory Usage 2,241KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_php
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (7)post_thanks_box
  • (7)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (7)post_thanks_postbit_info
  • (7)postbit
  • (7)postbit_onlinestatus
  • (7)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete