The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#11
|
|||
|
|||
Quote:
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? |
#12
|
||||
|
||||
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
|
#13
|
|||
|
|||
Quote:
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 |
#14
|
|||
|
|||
Quote:
Oh, it's doable. Like I said, we are already testing on-site references for posts. The others are just very similar cases. |
#15
|
||||
|
||||
Ok so imagine the pseduo code:
PHP Code:
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). |
#16
|
|||
|
|||
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. |
#17
|
|||
|
|||
Quote:
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|