PDA

View Full Version : vbcms_widget_recentblogposts_page


HondaATC
11-26-2009, 02:23 AM
OK, on the home page, in the Recent Blog Posts widget, I want to change the text effects in that widget ONLY (for the time being anyhow) as I understand the system from the .pdf's that Don released today, I go to the template editor, and go to the vbcms_widget_recentblogposts_page template and edit it with my CSS for this to happen, correct?

I'm not sure if its a bug or what (Might be my bad CSS I'm just trying to learn too), but I can't get anything to change.

Original code:<div class="cms_widget">
<div class="block">
<div class="cms_widget_header">

<img src="images/cms/widget-blog.png" alt="{vb:rawphrase recent_blog_posts}" /> {vb:rawphrase recent_blog_posts}
</div>
<div class="cms_widget_content">
{vb:raw result_html}
</div>
</div>
</div>

What I want is white text in the header...so according to what I've been trying to learn at w3schools.com it should be:

<div class="cms_widget">
<div class="block">
<div class="cms_widget_header">
<style type="text/css">
#header1
{text-align:center;
color:white
}
</style>
<p id="header1"><img src="images/cms/widget-blog.png" alt="{vb:rawphrase recent_blog_posts}" /> {vb:rawphrase recent_blog_posts}</p>
</div>
<div class="cms_widget_content">
{vb:raw result_html}
</div>
</div>
</div>


But it doesn't work :( Where am I going wrong, someone point me in the right direction? I've gotten the stylevar's figured out pretty well but I'm just looking for some more flexibility.

bobster65
11-26-2009, 02:48 AM
why not just add the style elements to the <p> tag if that is all you are using it for..

<div class="cms_widget">
<div class="block">
<div class="cms_widget_header">
<p style="text-align: center; color: white;"><img src="images/cms/widget-blog.png" alt="{vb:rawphrase recent_blog_posts}" /> {vb:rawphrase recent_blog_posts}</p>
</div>
<div class="cms_widget_content">
{vb:raw result_html}
</div>
</div>
</div>

HondaATC
11-26-2009, 02:56 AM
Actually I was just reading about how to do that, and had tried doing exactly that and it still doesn't change :/ I even cut and pasted your code just to make absolute sure it and still doesn't work? Am I on the right template? This is the one the dictionary says I should be changing...

bobster65
11-26-2009, 03:28 AM
Actually I was just reading about how to do that, and had tried doing exactly that and it still doesn't change :/ I even cut and pasted your code just to make absolute sure it and still doesn't work? Am I on the right template? This is the one the dictionary says I should be changing...

it SHOULD work... did you do a HARD refresh of the page? I'm not sure if its the right template or not, but I do know that you can add style elements like that.. I just did a quick test and it worked fine for me in both IE and FF..

HondaATC
11-26-2009, 03:38 AM
Yup, Ctrl + R in firefox and I also opened a IE window and tried it as well. Stayed the same. Hmmm... I tried a few other templates I thought could of been it as well:

vbcms_searchresult_blogentry
vbcms_widget_recentBlogs_page (This one, actually has the text "Recent Blog Posts" in it instead of injecting a vbulletin phrase like the one I first started working on)

I can't get results out of either one of them either.

bobster65
11-26-2009, 03:45 AM
Yup, Ctrl + R in firefox and I also opened a IE window and tried it as well. Stayed the same. Hmmm... I tried a few other templates I thought could of been it as well:

vbcms_searchresult_blogentry
vbcms_widget_recentBlogs_page (This one, actually has the text "Recent Blog Posts" in it instead of injecting a vbulletin phrase like the one I first started working on)

I can't get results out of either one of them either.

did you view the source on the page to see if your template edits are showing up?

Lynne
11-26-2009, 04:14 AM
To find the template to modify, do this - vboptions > General Settings > Add Template Name in HTML Comments > set to Yes . Then go back to your page and view the source code and you will see the name of the template called around your part of the code. Sometimes the template is the one mentioned at the very top of the page source.

hoof
11-26-2009, 12:35 PM
To find the template to modify, do this - vboptions > General Settings > Add Template Name in HTML Comments > set to Yes . Then go back to your page and view the source code and you will see the name of the template called around your part of the code. Sometimes the template is the one mentioned at the very top of the page source.

Thanks Lynne, this makes it a lot easier for me...completely overlooked that setting all this time lol

HondaATC
11-26-2009, 07:37 PM
Lynne, I tried what you suggested. According to the source, it is "cms_widget_header"


<div class="cms_widget">
<div class="block">
<!-- Widget Header -->
<div class="cms_widget_header">
<h3>Recent Blog Posts</h3>
</div>

<!-- SEARCH RESULTS DATA -->
<div class="cms_widget_content">
<!-- BEGIN TEMPLATE: vbcms_searchresult_blogentry -->



There is a vbcms_widget_headerfont stylevar, but it doesn't have the feature to change the color...just the size. There is no template with the name cms_widget_header, or anything similar from what I can tell. I see that the "Recent Blog Posts" is coded in with just the h3 tag...does this mean there isn't a template to change the header after all, and that there is only one for the search results displayed under it?