vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Design and Graphics Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=168)
-   -   Tags in news (https://vborg.vbsupport.ru/showthread.php?t=192808)

Blade-uk 10-06-2008 01:21 AM

Tags in news
 
Using vBAdvanced CMPS.

Currently trying to get the tags from threads to appear with the news item being displayed.

newsbits code -

Code:

<if condition="!$mod_options['portal_news_legacy']">
        <tr>
                <td class="thead"><if condition="$mod_options['portal_news_showicon']">$vba_style[portal_blockbullet]</if> $news[prefix] <a href="$vboptions[bburl]/showthread.php?$session[sessionurl]t=$news[threadid]">$news[title]</a></td>
        </tr>
</if>
<tr>
        <td class="<if condition="$mod_options['portal_news_legacy']">thead<else />alt2</if>">
                <if condition="($mod_options['portal_news_showrating'] AND $news['rating']) OR ($news['subscribed'] AND $mod_options['portal_news_showsubscribed'])">
                        <span style="float:$stylevar[right]">
                                <if condition="$mod_options['portal_news_showrating'] AND $news['rating']">
                                        <img alt="" src="$stylevar[imgdir_rating]/rating_$news[rating].gif" title="<phrase 1="$news[votenum]" 2="$news[voteavg]">$vbphrase[thread_rating_x_votes_y_average]</phrase>" />
                                </if>

                                <if condition="$news['subscribed'] AND $mod_options['portal_news_showsubscribed']">
                                        <img alt="" class="inlineimg" src="$stylevar[imgdir_misc]/subscribed.gif" title="$vbphrase[you_are_subscribed_to_this_thread]" />
                                </if>
                        </span>
                </if>
                $news[dateposted] - <phrase 1="$vboptions[bburl]/member.php?$session[sessionurl]u=$news[postuserid]" 2="$news[postusername]">$vbphrase[by_x]</phrase>
</td>
<if condition="$show['tag_box']">
<!-- thread tags -->
        <br />
        <table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
        <tr>
                <td class="thead">
                        <if condition="$show['manage_tag']"><div style="float: $stylevar[right]" class="normal">
                                <a href="threadtag.php?$session[sessionurl]t=$thread[threadid]" id="tag_edit_link">$vbphrase[edit_tags]</a>
                        </div></if>
                        <a name="taglist"></a>
                        <a href="tags.php$session[sessionurl_q]">$vbphrase[tags]</a>
                </td>
        </tr>
        <tr>
                <td class="alt1 smallfont" id="tag_list_cell">$tag_list</td>
        </tr>
        </table>

        <script type="text/javascript" src="clientscript/vbulletin_ajax_taglist.js?v=$vboptions[simpleversion]"></script>
                <script type="text/javascript" src="clientscript/vbulletin_ajax_tagsugg.js?v=$vboptions[simpleversion]"></script>
<!-- / thread tags -->
</if>
</tr>
<tr>
        <td align="$stylevar[left]" class="alt1" valign="top">
                <if condition="$show['paperclip']">
                        <span style="float:$stylevar[right]">
                                <a href="#" onclick="vba_attach_win($news[threadid]); return false"><img class="inlineimg" src="$stylevar[imgdir_misc]/paperclip.gif" border="0" title="<phrase 1="$news[attach]">$vbphrase[x_attachments]</phrase>" alt="" /></a>
                        </span>
                </if>
                <if condition="$news['avatarpath']">
                        <img align="$stylevar[left]" style="padding:6px" alt="" border="0" src="$news[avatarpath]" title="$news[postusername]'s $vbphrase[avatar]" />
                </if>
                $news[message]

                <if condition="$show['signature']">
                <div>__________________<br />
                $news[signature]</div>
                </if>

                </td>
        </tr>

        <if condition="$news['attachment']">
                <tr class="alt1">
                        <td>
                                <fieldset class="fieldset">
                                <legend>Attached Files</legend>
                                <div style="padding:$stylevar[formspacer]px">
                                        $news[attachment]
                                </div>
                                </fieldset>
                        </td>
                </tr>
        </if>

        <tr class="alt2" valign="middle">
        <td valign="middle">
                <span style="float:right">
                <if condition="$show['editbutton']">
                        <a href="$vboptions[bburl]/editpost.php?$session[sessionurl]do=editpost&amp;p=$news[postid]"><img alt="$vbphrase[edit_this_post]" border="0" src="$stylevar[imgdir_button]/edit.gif" /></a>
                </if>

                <if condition="$show['replybutton']">
                        <a href="$vboptions[bburl]/newreply.php?$session[sessionurl]do=newreply&amp;t=$news[threadid]"><img alt="$vbphrase[reply_to_this_post]" border="0" src="$stylevar[imgdir_button]/reply_small.gif" /></a>
                </if>

                <if condition="$mod_options['portal_news_showsendfriend']">
                        <a href="$vboptions[bburl]/sendmessage.php?$session[sessionurl]do=sendtofriend&amp;t=$news[threadid]"><img alt="" border="0" src="$stylevar[imgdir_button]/sendtofriend.gif" title="$vbphrase[send_to_friend]" /></a>
                </if>

                <if condition="$mod_options['portal_news_showprintable']">
                        <a href="$vboptions[bburl]/printthread.php?$session[sessionurl]t=$news[threadid]"><img alt="" border="0" src="$stylevar[imgdir_button]/printer.gif" title="$vbphrase[show_printable_version]" /></a>
                </if>
                </span>

                <span class="smallfont">
                <if condition="$mod_options['portal_news_allowreplies']">$news[replycount] <if condition="$news['reply_noformat'] == 1">$vbphrase[reply]<else />$vbphrase[replies]</if></if><if condition="$mod_options['portal_news_showviews'] AND $mod_options['portal_news_allowreplies']"> | </if><if condition="$mod_options['portal_news_showviews']">$news[views] $vbphrase[views]</if></span>
        </td>
</tr>

Tag code -

Code:

<if condition="$show['tag_box']">
<!-- thread tags -->
        <br />
        <table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
        <tr>
                <td class="thead">
                        <if condition="$show['manage_tag']"><div style="float: $stylevar[right]" class="normal">
                                <a href="threadtag.php?$session[sessionurl]t=$thread[threadid]" id="tag_edit_link">$vbphrase[edit_tags]</a>
                        </div></if>
                        <a name="taglist"></a>
                        <a href="tags.php$session[sessionurl_q]">$vbphrase[tags]</a>
                </td>
        </tr>
        <tr>
                <td class="alt1 smallfont" id="tag_list_cell">$tag_list</td>
        </tr>
        </table>

        <script type="text/javascript" src="clientscript/vbulletin_ajax_taglist.js?v=$vboptions[simpleversion]"></script>
                <script type="text/javascript" src="clientscript/vbulletin_ajax_tagsugg.js?v=$vboptions[simpleversion]"></script>
<!-- / thread tags -->
</if>

Can anyone implement the 2 :D ?

Andy

legionofangels 10-06-2008 07:23 AM

Why don't you ask at vbadvanced or whatever?

Secondly it's a programming/coding question not a design/graphics question.

Blade-uk 10-06-2008 04:04 PM

Quote:

Originally Posted by legionofangels (Post 1638428)
Why don't you ask at vbadvanced or whatever?

Secondly it's a programming/coding question not a design/graphics question.

I have already, they are slow at replying :)

Andy


All times are GMT. The time now is 02:53 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01027 seconds
  • Memory Usage 1,748KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete