Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 05 Oct 2016, 21:19
Necrophyte Necrophyte is offline
 
Join Date: Jul 2014
Getting the latest Article to display

So I'm trying to use one of the modules on my home page to list the latest article that has the tag 'spotlight' in it. Will only display the latest one, not all of them. I've no idea where to even start. I haven't figured out how to edit modules themselves yet, but I imagine I can find what I'm looking for in the 'Slider' Module.
Any hints on where or how would be awesome.

You can almost do this with the Search Module.
Using JSON:
{"tag":["spotlight"],"channel":["13"],"sort":{"created":"desc"},"view":null,"exclude_type":["vBForum_PrivateMessage"]}

Can't figure out what possible views other than compact, and topic. If there was a full, or post (Yes I tried those) and it showed the full article. That would have been awesome so there has to be another way.
Reply With Quote
  #2  
Old 05 Oct 2016, 22:29
noypiscripter's Avatar
noypiscripter noypiscripter is offline
 
Join Date: Aug 2013
You can use PHP module and do a search with that JSON criteria. You can style it the way you want to.
__________________
Glenn Vergara, an ex-vB Developer, now a vB Mod Developer

GIPHY for vB5 | AutoLinker | Video Attachments Player | New Registered Users Module | Clear System Cache Cron | DragNDrop Upload | Topic AJAX AutoUpdate | Force Read Topic
Reply With Quote
  #3  
Old 05 Oct 2016, 23:55
Necrophyte Necrophyte is offline
 
Join Date: Jul 2014
Glenn,

Thanks for the quick response as always. I'm lost on how I can get it to search and display the data in a PHP though. I can get the search function to find it properly, but I can't get it to display just the entire article without the click more.
Reply With Quote
  #4  
Old 06 Oct 2016, 03:29
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
So you are saying your aren't familiar with how to write PHP/MySQL code to do this or that you don't know the exact query because you are unfamiliar with the database schema?
__________________
Former vBulletin.org Staff Member

Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before.
W3Schools -
Online vBulletin Manual
If I post some CSS and don't say where it goes, put it in the additional.css template.
I will NOT help via PM (you will be directed to post in the forums for help.)
Reply With Quote
  #5  
Old 06 Oct 2016, 04:49
Necrophyte Necrophyte is offline
 
Join Date: Jul 2014
I could run the queries to show but then I have BB code through out. Is there a way to parse this to HTML?
Reply With Quote
  #6  
Old 06 Oct 2016, 05:32
noypiscripter's Avatar
noypiscripter noypiscripter is offline
 
Join Date: Aug 2013
There's a parse function called parseNodeText in the bbcode frontend controller that you can call.
__________________
Glenn Vergara, an ex-vB Developer, now a vB Mod Developer

GIPHY for vB5 | AutoLinker | Video Attachments Player | New Registered Users Module | Clear System Cache Cron | DragNDrop Upload | Topic AJAX AutoUpdate | Force Read Topic
Reply With Quote
  #7  
Old 06 Oct 2016, 06:35
Necrophyte Necrophyte is offline
 
Join Date: Jul 2014
TY, that's what I needed to know!

--------------- Added 06 Oct 2016 at 18:54 ---------------

For anyone that comes to this page looking for answers. You can open a PHP Module.
I wanted mine to be displayed in a max height of 800px. You can change that to what you want or remove it.
In the Query if you do not wish to have a taglist search. Just remove : 'AND taglist LIKE '%spotlight%''

You'll also need to know the nodeid for articles. Mine is 13. Change 13 to whatever your article nodeid is. You can find them in the channel manager.

Put the following code:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


Last edited by Necrophyte; 13 Nov 2016 at 16:43.
Reply With Quote
  #8  
Old 07 Oct 2016, 00:05
noypiscripter's Avatar
noypiscripter noypiscripter is offline
 
Join Date: Aug 2013
You will also need to add the table prefix (if any). This is not required if the TABLE_PREFIX global variable is added in the query.


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

There was also a typo in your CSS. Should be:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

instead of:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Use colon instead of equal sign.
__________________
Glenn Vergara, an ex-vB Developer, now a vB Mod Developer

GIPHY for vB5 | AutoLinker | Video Attachments Player | New Registered Users Module | Clear System Cache Cron | DragNDrop Upload | Topic AJAX AutoUpdate | Force Read Topic
Reply With Quote
  #9  
Old 13 Nov 2016, 16:43
Necrophyte Necrophyte is offline
 
Join Date: Jul 2014
You are correct sir. I edited the post to use your changes.
Reply With Quote
Reply

Similar Threads
Thread Thread Starter Forum Replies Last Post
vBa: Show GARS article image on article Cole2026 vBulletin 3.5 Add-ons 13 10 Apr 2006 18:13



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


New To Site? Need Help?

All times are GMT. The time now is 00:12.

Layout Options | Width: Wide Color: