![]() |
|
Thread Tools |
#1
|
|||
|
|||
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. No members have liked this post.
|
#2
|
||||
|
||||
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 No members have liked this post.
|
#3
|
|||
|
|||
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. No members have liked this post.
|
#4
|
||||
|
||||
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.) No members have liked this post.
|
#5
|
|||
|
|||
I could run the queries to show but then I have BB code through out. Is there a way to parse this to HTML?
No members have liked this post.
|
#6
|
||||
|
||||
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 The following members like this post: Lynne
|
#7
|
||||
|
||||
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:
Last edited by Necrophyte; 13 Nov 2016 at 16:43. |
#8
|
||||||||||||
|
||||||||||||
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.
There was also a typo in your CSS. Should be:
instead of:
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 The following members like this post: Lynne
|
#9
|
|||
|
|||
You are correct sir. I edited the post to use your changes.
No members have liked this post.
|
![]() |
![]() |
||||
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 |
«
Previous Thread
|
Next Thread
»
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
|
|
New To Site? | Need Help? |
All times are GMT. The time now is 23:04.