Time2Dine.co.nz is Online Restaurant Booking
 
Elusion Electronic Cigarette
 New Zealand Restaurants Forum
Restaurant Forum | Contact Time2Dine | Book Online & Save | About Time2Dine

Go Back   New Zealand Restaurants & Food Forum > Search Engine Optimisation > SEO vBulletin
Register

Reply
 
LinkBack Thread Tools
  #1  
Old 9th May 05, 03:21 AM
Junior Reviewer
 
Join Date: May 2005
Posts: 5
mediax is on a distinguished road
Question Dynamic img tag in vBulletin posts

Hello,

i have tried to get this to work :

I want to get the images posted on the forum to get a dynamic tag. I have tried to get the thread title in the tag but i failed.

In the file functions_bbcodeparse.php you will find on line 1047

Code:
 return '<img src="' .  $link . '" border="0" alt="" />';
but i do not understand how i get the thread title in alt tag.....

Can someone help me out... I know google likes the alt tag !


thx

kees
Reply With Quote
  #2  
Old 9th May 05, 09:03 AM
T2DMan's Avatar
Administrator
 
Join Date: Apr 2004
Location: Auckland, New Zealand
Posts: 7,839
T2DMan is on a distinguished road
Default

Hi

A very good idea - replace the existing function in functions_bbcodeparse.php with the following - works a dream, but it does mean that all images in that thread get the same alt tag:

I thought of the option of using the post title if that existed. But the postinfo data is not available in the bbcode file, so I would have to populate the postinfo variable. Would add quite a bit of overhead. So probably better to keep with just the threadtitle.

[html]function handle_bbcode_img_match($link)
{
//added by t2dman 1 line
global $threadinfo;
$link = strip_smilies(str_replace('\\"', '"', $link));

// remove double spaces -- fixes issues with wordwrap
$link = str_replace(' ', '', $link);
//t2dman added threadinfo title
return '<img src="' . $link . '" border="0" alt="' . $threadinfo['title'].'" />';
}
[/html]

Last edited by T2DMan; 13th Jun 05 at 10:38 PM. Reason: the ' " bug strikes again
Reply With Quote
  #3  
Old 9th May 05, 09:08 AM
Junior Reviewer
 
Join Date: May 2005
Posts: 5
mediax is on a distinguished road
Default

thx !

i will try it right now
Reply With Quote
  #4  
Old 13th Jun 05, 09:42 PM
Junior Reviewer
 
Join Date: Jun 2005
Location: United Kingdom
Posts: 17
Michael is on a distinguished road
Default

Quote:
Originally Posted by T2DMan
Hi

A very good idea - replace the existing function in functions_bbcodeparse.php with the following - works a dream, but it does mean that all images in that thread get the same alt tag:

I thought of the option of using the post title if that existed. But the postinfo data is not available in the bbcode file, so I would have to populate the postinfo variable. Would add quite a bit of overhead. So probably better to keep with just the threadtitle.

[html]function handle_bbcode_img_match($link)
{
//added by t2dman 1 line
global $threadinfo;
$link = strip_smilies(str_replace('\\"', '"', $link));

// remove double spaces -- fixes issues with wordwrap
$link = str_replace(' ', '', $link);
//t2dman added threadinfo title
return '<img src="' . $link . '" border="0" alt="' . $threadinfo['title"].'" />';
}
[/html]
Upon adding the code i received a parse error and noticed that you had added $threadinfo['title"] instead of $threadinfo['title'].
Reply With Quote
  #5  
Old 13th Jun 05, 10:37 PM
T2DMan's Avatar
Administrator
 
Join Date: Apr 2004
Location: Auckland, New Zealand
Posts: 7,839
T2DMan is on a distinguished road
Default

I can't wait till I upgrade to v3.5!!! - the " ' bug in 3.06 is a real pain!!! - I have tried testing it on 3.5 and have not seen an issue yet.

Sometimes it shows properly, other times not!
Reply With Quote
  #6  
Old 13th Jun 05, 10:45 PM
Junior Reviewer
 
Join Date: Jun 2005
Location: United Kingdom
Posts: 17
Michael is on a distinguished road
Default

Quote:
Originally Posted by T2DMan
I can't wait till I upgrade to v3.5!!! - the " ' bug in 3.06 is a real pain!!! - I have tried testing it on 3.5 and have not seen an issue yet.
Sometimes it shows properly, other times not!
Do we have a set release date yet for the release?
Reply With Quote
  #7  
Old 13th Jun 05, 11:10 PM
T2DMan's Avatar
Administrator
 
Join Date: Apr 2004
Location: Auckland, New Zealand
Posts: 7,839
T2DMan is on a distinguished road
Default Release date v3.5

No release date that I have seen - they are waiting for everyone to update their hacks and request any extra pinholes into the code - as well as giving the wider vb community some time to find any bugs.

Quite a number of people have put the beta's onto their live boards. My guess, there wont be many substantial changes, and it there are, most people's hacks will not be on the main php source code, so upgrades will be easy.
Reply With Quote
  #8  
Old 13th Jun 05, 11:37 PM
Junior Reviewer
 
Join Date: Jun 2005
Location: United Kingdom
Posts: 17
Michael is on a distinguished road
Default

Quote:
Originally Posted by T2DMan
No release date that I have seen - they are waiting for everyone to update their hacks and request any extra pinholes into the code - as well as giving the wider vb community some time to find any bugs.

Quite a number of people have put the beta's onto their live boards. My guess, there wont be many substantial changes, and it there are, most people's hacks will not be on the main php source code, so upgrades will be easy.
I really dont agree with actually upgrading a live board when you are using an unstable release. I mean sure if you want to put it onto a test board then thats fine, but you are putting the forum and the database (?) in jeprody.

I am assuming that you will be releasing an updated version of your SEO hack for 3.5? Should we expect any new exciting additions to the hack?
Reply With Quote
  #9  
Old 14th Jun 05, 11:19 AM
T2DMan's Avatar
Administrator
 
Join Date: Apr 2004
Location: Auckland, New Zealand
Posts: 7,839
T2DMan is on a distinguished road
Default

http://www.vBulletin.com has the beta version live. http://forums.digitalpoint.com/ has it live. Floris of vBulletin has it live on all her forums ...

If it is good enough for them ...
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

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
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Search Engine Optimize vBulletin T2DMan SEO vBulletin 260 23rd Nov 08 09:16 PM
Search Engine Optimize vBulletin 3.5 T2DMan SEO vBulletin 9 8th Sep 05 01:46 AM
SEO vBulletin T2DMan SEO vBulletin 0 15th Feb 05 03:33 PM
Search Engine Optimizing vBulletin T2DMan SEO vBulletin 0 28th Oct 04 12:23 PM



Powered by: vBulletin Copyright ©2000 -2012, Jelsoft Enterprises Limited.
Search Engine Friendly URLs by vBSEO 3.2.0
© 2010 Time2Dine