Announcement

Collapse
No announcement yet.

CMS Widget Questions: Removing black border and getting rid of previews.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • CMS Widget Questions: Removing black border and getting rid of previews.

    I am trying to accomplish two things with widgets on the CMS. I have searched the forums and google for solutions but have not been able to accomplish this.

    1) I'd like to remove the black border around the widgets - - I'd like keep the grey shadow but won't to remove all of the dark lines.
    2) For Recent Blogs and Recent threads, I'd like to remove the preview text to reduce clutter. In the 'recent threads' style sheet (vbcms_widget_recentthreads_page) I removed the text containing 'preview' but this didn't resolve. Below is the code.

    Any help is greatly appreciated.



    <div class="cms_widget">
    <div class="block">
    <div class="cms_widget_header">
    <h3><img alt="" src="{vb:stylevar imgdir_cms}/widget-forum.png" /> {vb:raw title}</h3>
    </div>
    <div class="cms_widget_content widget_content">
    <vb:each from="threads" key="threadid" value="thread">
    <div class="cms_widget_post_bit widget_post_bit">
    <div class="cms_widget_post_userinfo widget_post_userinfo">
    <vb:if condition="$thread['postusername']!='guestuser' AND $vboptions['avatarenabled']">
    <div class="cms_widget_post_useravatar widget_post_useravatar">
    <a class="comments_member_avatar_link" href="{vb:link member, {vb:raw thread}}">
    <vb:if condition="$thread['avatarurl']" >
    <img src="{vb:raw thread.avatarurl}" alt="{vb:raw thread.postusername}" />
    <vb:else />
    <img src="{vb:stylevar imgdir_misc}/unknown.gif" alt="{vb:raw thread.postusername}" />
    </vb:if>
    </a>
    </div>
    </vb:if>
    </div>
    <div class="cms_widget_post_comment<vb:if condition="!$vboptions['avatarenabled']">_noavatar</vb:if> widget_post_comment<vb:if condition="!$vboptions['avatarenabled']">_noavatar</vb:if>">
    <h4 class="cms_widget_post_header widget_post_header">
    <a href="{vb:link thread, {vb:raw thread}}">{vb:raw thread.title}</a>
    </h4>
    {vb:rawphrase thread_starter}:
    <vb:if condition="thread.postusername == 'guestuser'">
    {vb:raw thread.postusername}
    <vb:else />
    <a href="{vb:link member, {vb:raw thread}}">{vb:raw thread.postusername}</a>
    </vb:if>



    {vb:rawphrase last_post_by}:
    <vb:if condition="$thread['lastposterid']" >
    <a href="{vb:link member, {vb:raw thread}, null, 'lastposterid', 'lastposter'}">{vb:raw thread.lastposter}</a>
    <vb:else />
    {vb:rawphrase by_x_guest, {vb:raw thread.lastposter}}
    </vb:if>
    {vb:raw thread.lastpostdate}<vb:if condition="!$thread['detailedtime']">, <span class="time">{vb:raw thread.lastposttime}</span></vb:if>
    <a href="{vb:raw thread.lastposturl}"><img class="inlineimg" src="{vb:stylevar imgdir_button}/lastpost-{vb:stylevar right}.png" alt="{vb:rawphrase go_to_last_post}" border="0" /></a>
    <vb:comment><br/>
    {vb:rawphrase replies_x_views_y, {vb:raw thread.replycount}, {vb:raw thread.views}}</vb:comment>
    </div>
    </div>
    </vb:each>
    </div>
    </div>
    </div>

  • #2
    In both cases you have to edit the widget template itself-

    Go to admincp>vbulletin CMS> Widgets -

    on the widget that you want to change- click on the configure button- a window will pop up, at the bottom of that window it will show the template name:

    example: vbcms_widget


    Go to admincp>styles & templates> style manager> your style> edit templates> VbCMS Templates> find that widget name

    Copy the info from THAT widget,

    Create a new Template: call it vbcms_widget_1

    Paste the info from the OLD Widget code in that spot. Alter the code to remove the black line, THEN go back to your

    Go to admincp>vbulletin CMS> Widgets -

    on the widget that you want to change- click on the configure button- a window will pop up, at the bottom of that window change the template name to your new edited template:

    vbcms_widget_1

    This way, you still have the default design and can easily revert if your code isn't correct. Edit your code to reflect the changes you want to make- i.e removing the border & preview attributes.

    To remove the black line issue, you would probably have to edit the <div class="block"> or <div class="cms_widget"> - this is done by finding it in your css and changing the attributes you don't like- in your case, the black border. You can create a new css and call it block_1 or cms_widget_1 and then change your template to reflect that <div class="block_1"> or <div class="cms_widget_1">

    In either case, it takes a little bit of work, but can be done.

    Or if you're positive you want to remove the border in ALL of your widgets, you can just go into the Style Manager> StyleVars> scroll down to vbcms, change the widget border settings

    - - - Updated - - -

    To Remove the Text Preview, Lynne has covered this topic in great detail here:

    https://www.vbulletin.com/forum/showthread.php/367297-How-to-Remove-text-descriptions-from-your-widgets
    Last edited by Budget101; Sun 20th May '12, 6:44am.

    Comment


    • #3
      Thanks! Appreciate your help.

      Comment


      • #4
        Originally posted by Budget101 View Post
        In both cases you have to edit the widget template itself-

        ....
        Hi,

        I've been trying this out on 4.2.0 Patch Level 2 and my widget disappears (from the cms page) as soon as I change the Template Name in the configuring widgets pop up.
        I can go and edit the built in template so I know I have that bit worked out.

        Can anyone check this on the latest version please.

        Many thanks

        Charles

        [UPDATE:]
        I have managed to make it work if I put the new template in the default style, now I need to do the same in my modified style.
        Last edited by vB_CharlesM; Tue 24th Jul '12, 9:28am.

        Comment

        widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
        Working...
        X