The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
need help on widget
I'm trying to figure out how to have a recent thread widget pull an img instead of text. for example: something on the lines of the Active Member Journals on the right hand side of this forum.
http://www.iwsti.com/ any advice would be great |
#2
|
||||
|
||||
Try a search because I helped someone do this a couple of months ago. I can't remember if it was a forum block or a widget, but you need to modify the query and then modify the template.
|
#3
|
|||
|
|||
I have searched for a good 30 minutes but it seems everyone has the same question as mw but it never gets answered.I'm sure it's just a small line of code im missing and its killing me. any help Lynne would be great
|
#4
|
||||
|
||||
It is for the forum blocks, but it is the same basic changes that need to be made. https://vborg.vbsupport.ru/showthread.php?t=273444
If you get stuck, do not just say "it didn't work". Post *exactly* what it is you want to do (images help) and tell us *exactly* what templates you modified (with before/after code in code tags) and *exactly* what file you modified (with before/after code in code tags). We cannot help you if you do not provide those things. |
#5
|
|||
|
|||
Hi Lynne. So basically, I have been trying to understand how to substitute this line of code:
Code:
<p class="cms_widget_post_content widget_post_content">{vb:raw thread.previewtext}</p> None of the code in vbcms_widget_recentthreads_page has been changed. HELP |
#6
|
||||
|
||||
I just linked you to a thread that talks about how to do that. You need to modify the widget query first and then use that new variable in the template. Did you read the thread I linked you to? Did you find the query code?
|
#7
|
|||
|
|||
Can you navigate me to where i can modify the widget query and show me where to find that query code ? Been trying to figure this out for the past 2 days
|
#8
|
||||
|
||||
The widget code is in /vb/vbcms/widgets/ So, find the appropriate script for the widget you are trying to modify there. I would guess it is the recentthreads.php script and the query is near the bottom of the file.
|
#9
|
|||
|
|||
Okay so i just located the recentthreads.php file in /packages/vbcms/widgets/recentthreads.php
what exactly do i need to change to get an image/attachment rather than text in the recent threads widget. |
#10
|
||||
|
||||
Did you read that thread I linked you to before? You need to modify the query to join with the attachment table and grab an attachment also. Since it isn't a cms article you are trying to just get a preview image for, it's going to be a bit tricky since you will also have to write some code to resize the image. Do you code at all because you will definitely have to write some code for this. If you don't know how to code at all, then you probably want to post in either the Unpaid or Paid Requests area to have someone else code it for you.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|