Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #11  
Old 05-15-2012, 09:48 PM
imnomarty imnomarty is offline
 
Join Date: Apr 2012
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It still does not work and I have no idea why. I'm not sure what I'm doing wrong. I tried the codes you guys gave, but still no luck.

Although thanks for all the help, this is a really great community for good software.
Reply With Quote
  #12  
Old 05-16-2012, 04:51 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You need to post a link to your page where it is not working and then post *exactly* (copy/paste it) what you have done and please use code tags when you do so.
Reply With Quote
  #13  
Old 05-16-2012, 05:34 PM
imnomarty imnomarty is offline
 
Join Date: Apr 2012
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Lynne View Post
You need to post a link to your page where it is not working and then post *exactly* (copy/paste it) what you have done and please use code tags when you do so.
Okay so here is the page. Front page of my site. http://thejestersgallery.com/content.php

So what i have done so far is follow the instructions on the site to make the plugin and instead of using his code I used yours. And since I want this to go in preview I used lewisforlife code to change it.
Code:
require_once(DIR . '/includes/functions_user.php');
if(self::VIEW_PAGE == $viewtype) {
$avatarurl = fetch_avatar_url($view->authorid, true);
if ($avatarurl[0]) $avatarurl = $avatarurl[0];

/* render template and register variables */
vB_Template::preRegister('vbcms_content_article_preview',array('avatarurl' => $avatarurl));
}
Then I put the img code into preview and all i get is a white box

Code:
<vb:if condition="$showuser OR $showpublishdate OR ($showupdated AND $lastupdated) OR ($viewcount AND $showviewcount) OR ($showrating AND $rating!='')">
	<div class="cms_article_username cms_publish_column">
<img src="{vb:raw avatarurl}" alt="Author Avatar" />
		<vb:if condition="$showuser">
			{vb:rawphrase by_x_nolink, {vb:raw memberaction_dropdown}}
		</vb:if>
Reply With Quote
  #14  
Old 05-16-2012, 08:56 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

As it says in the original article, you cannot have the condition (if(self::VIEW_PAGE == $viewtype)) around the code if you need it for the preview page.
Reply With Quote
  #15  
Old 05-16-2012, 10:37 PM
imnomarty imnomarty is offline
 
Join Date: Apr 2012
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank You this is wonderful
Reply With Quote
  #16  
Old 08-26-2013, 05:39 PM
JustAskJulie JustAskJulie is offline
 
Join Date: Nov 2002
Posts: 197
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I used the coding below and I'm getting nothing showing up. My site (adult related)

Quote:
Originally Posted by Lynne View Post
I got it to work by using this as the plugin code:

Code:
require_once(DIR . '/includes/functions_user.php');
if(self::VIEW_PAGE == $viewtype) {
$avatarurl = fetch_avatar_url($view->authorid, true);
if ($avatarurl[0]) $avatarurl = $avatarurl[0];

/* render template and register variables */
vB_Template::preRegister('vbcms_content_article_page',array('avatarurl' => $avatarurl));
}
Quote:
Originally Posted by Lynne View Post
I just placed it where they spit out the authors name:
HTML Code:
			<vb:if condition="$showuser">
<img src="{vb:raw avatarurl}" alt="Author Avatar" />
				<div class="article_username_container<vb:if condition="!$showrating">_full</vb:if>">
					{vb:rawphrase by_x_nolink, {vb:raw memberaction_dropdown}}
				</div>
			</vb:if>
However, it needs some styling, so you'll have to add some CSS to move things around. (Since I don't actually use this code, I never got that far.)
Reply With Quote
  #17  
Old 08-26-2013, 08:41 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Try removing the condition around that template code and see if it shows up. Also, you are editing the style that you are using, right?
Reply With Quote
  #18  
Old 08-30-2013, 07:51 PM
JustAskJulie JustAskJulie is offline
 
Join Date: Nov 2002
Posts: 197
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Lynne View Post
Try removing the condition around that template code and see if it shows up. Also, you are editing the style that you are using, right?
So, change
Code:
<vb:if condition="$showuser">
<img src="{vb:raw avatarurl}" alt="Author Avatar" />
				<div class="article_username_container<vb:if condition="!$showrating">_full</vb:if>">
					{vb:rawphrase by_x_nolink, {vb:raw memberaction_dropdown}}
				</div>
			</vb:if>
to

Code:
<img src="{vb:raw avatarurl}" alt="Author Avatar" />
				<div class="article_username_container<vb:if condition="!$showrating">_full</vb:if>">
					{vb:rawphrase by_x_nolink, {vb:raw memberaction_dropdown}}
				</div>
?

Still doesn't give me an avatar
Reply With Quote
  #19  
Old 08-31-2013, 02:37 AM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If it still doesn't give you an avatar, then you either have it inside another condition that isn't allowing it to display or you are editing the wrong template or wrong style template.
Reply With Quote
  #20  
Old 09-04-2013, 03:10 PM
JustAskJulie JustAskJulie is offline
 
Join Date: Nov 2002
Posts: 197
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm in the vbcms_content_article_page template.

Going to the top of the code, this is what it has. Am I putting the Author avatar stuff in the wrong place?
Code:
{vb:raw css}

<div class="article_width" id="article_content">
	<div class="title">

                <h1 class="article_title cms_article_title"><span>{vb:raw title}</span>
                        <vb:if condition="$can_edit">
                                <a href="{vb:raw edit_url}" class="edit"><img class="editimage" src="{vb:stylevar imgdir_cms}/edit_small.png" alt="{vb:rawphrase edit}" /></a>
                        </vb:if>
		</h1>
	</div>
	<div class="article_author_date_comment_container">
                <vb:comment>
                                              
<img src="{vb:raw avatarurl}" alt="Author Avatar" />
                                <div>
                                        <a href="{vb:link member, {vb:raw userid}}"><img src="{vb:raw vboptions.bburl}/image.php?{vb:raw session.sessionurl}u={vb:raw userid}&amp;type=profile" alt="" class="post_avatar" /></a>
                                </div>
                       
                </vb:comment>
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:45 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.06845 seconds
  • Memory Usage 2,267KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (6)bbcode_code
  • (1)bbcode_html
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete