Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 03-13-2010, 09:10 PM
rayofvictory rayofvictory is offline
 
Join Date: Mar 2010
Posts: 6
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default How to display entries from MySQL into sidebar in vb 4?

This is the first time I ever had to use vbulletin for a client. The requirement is that I have to publish a feed from MySQL in the sidebar for CMS/blog and forum of vbulletin 4 implementation.

Could you please point me in the right direction?
Reply With Quote
  #2  
Old 03-13-2010, 09:58 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I don't know what you mean by "publish a feed from MySQL". However, I'll tell you that you will probably do this for your CMS page by creating a PHP widget and on the Forum page by creating a PHP block. I don't know about the blog.
Reply With Quote
  #3  
Old 03-14-2010, 03:45 PM
rayofvictory rayofvictory is offline
 
Join Date: Mar 2010
Posts: 6
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for the quick reply!

Publish from feed in the sense :

I have to display the following results :

PHP Code:
SELECT <a href 'http://abc.com/profile?ID=11.aspx'>Check 1</aFROM xyz where DATE between curdate() AND ExpiryDate limit 20
That should display a feed like thing on the right sidebar with the following output (all links are hyperlinks)..

Check 1
Check 2
Check 3
......so on.

Did I make sense? What is the best way of doing it? Thank you so much!
Reply With Quote
  #4  
Old 03-14-2010, 11:27 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I guess you want a PHP widget (for the CMS page) and block (for the forum.php page). there have been several released in the mods forum if you need to see examples.
Reply With Quote
  #5  
Old 03-14-2010, 11:36 PM
rayofvictory rayofvictory is offline
 
Join Date: Mar 2010
Posts: 6
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Please look at this thread : https://vborg.vbsupport.ru/showthread.php?t=238270

Am struggling for so many hours now! How to display an array in a PHP block?

p.s : (Though I have a license, it still is blocking my own code from being displayed in the forums. I am baffled with the whole license process)..
Reply With Quote
  #6  
Old 03-16-2010, 03:19 AM
fdifranco fdifranco is offline
 
Join Date: Feb 2010
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I wrote a PHP widget for a fellow a few weeks ago.

It sounds like you are trying to do something similar. Have a look at this post.

You will want to change the SQL to suit your needs and also make links out of the data by adding the appropriate <a></a> tags.

So take what I wrote and tweak it a little bit. It shouldn't be too difficult.

-fab
Reply With Quote
  #7  
Old 03-16-2010, 03:32 AM
rayofvictory rayofvictory is offline
 
Join Date: Mar 2010
Posts: 6
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by fdifranco View Post
I wrote a PHP widget for a fellow a few weeks ago.

It sounds like you are trying to do something similar. Have a look at this post.

You will want to change the SQL to suit your needs and also make links out of the data by adding the appropriate <a></a> tags.

So take what I wrote and tweak it a little bit. It shouldn't be too difficult.

-fab
Sir, you are fabulous! I got everything working in the last hour but was having issues trying to concatenate <br/> tags. Was using </br> and it didn't work, now it does!

I really really appreciate your help I wish there is more support staff like you here for a commercial product like this. Searching without keyword knowledge is a pain for newbie vb4 users like me. Thanks again
Reply With Quote
Reply


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 07:32 PM.


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.07722 seconds
  • Memory Usage 2,219KB
  • 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
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete