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

Reply
 
Thread Tools Display Modes
  #1  
Old 11-19-2011, 04:31 AM
apelsiny apelsiny is offline
 
Join Date: Nov 2011
Location: Russian
Posts: 2
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Widget User Area

The widget worked fine on suite 4.1.7 default template, but when installed the template Seamus, then on the main page /content.php give an error
Code:
Fatal error: Call to undefined function fetch_avatar_url() in /home/users2/d/ddaxenon/domains/site.ru/packages/vbcms/widget/execphp.php(191) : eval()'d code on line 23
Suite 4.1.8 at the default template, this error also when I put this widget

help me please
Reply With Quote
  #2  
Old 11-19-2011, 03:11 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

There is no User Area widget, so I'm not sure what you are talking about.

(That error is from a modification though.)
Reply With Quote
  #3  
Old 11-23-2011, 08:33 AM
apelsiny apelsiny is offline
 
Join Date: Nov 2011
Location: Russian
Posts: 2
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Here is the code of my widget. Help make it right

PHP Code:
$output2 '<link rel="stylesheet" href="my_css.css" type="text/css" />';
if (
vB::$vbulletin->userinfo['username']=='Unregistered') {
$output2.= '<form id="navbar_loginform_my" action="login.php?'.$vbulletin->session->vars['sessionurl'] .'do=login" method="post" onsubmit="md5hash(vb_login_password_my, vb_login_my_md5password_my, vb_login_my_md5password_utf_my, 0)">';
$output2.='<div class="my_welcome">Wellcome, Guest!</div>';
$output2.='<div class="my_avatar"><img src="/images/cms/noavatar.jpg"/></div>';
$output2.='<table border="0" cellpadding="0" cellspacing="0" width="100%">';
$output2.='<tr><td class="my_name">Login</td><td class="my_val"><input type="text" name="vb_login_username" id="navbar_username_my" size="10" /></td></tr>';
$output2.='<tr><td class="my_name">Paasword</td><td class="my_val"><input type="password" name="vb_login_password" id="navbar_password_my" size="10" /></td></tr>';
$output2.='<input type="text"name="vb_login_password_hint" id="navbar_password_hint_my" size="10" style="display:none;" />';
$output2.='<tr><td class="my_name2" colspan="2"><input type="checkbox" name="cookieuser" value="1" id="cb_cookieuser_navbar_my" class="cb_cookieuser_navbar" /> Remember me</td></tr>';
$output2.='<tr><td class="my_name"></td><td class="my_val"><input type="submit" value="Log in"  /></td></tr>';
$output2.='<input type="hidden" name="s" value="'.$vbulletin->session->vars['sessionhash'].'" />';
$output2.='<input type="hidden" name="securitytoken" value="'.$vbulletin->userinfo['securitytoken_raw'].'" />';
$output2.='<input type="hidden" name="do" value="login" />';
$output2.='<input type="hidden" name="vb_login_md5password_my" />';
$output2.='<input type="hidden" name="vb_login_md5password_utf_my" />';
$output2.='<tr><td class="my_name3" colspan="2"><a href="register.php'.$vbulletin->session->vars['sessionurl_q'] .'" rel="nofollow">Registration</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="faq.php">Help</a></td></tr>';
$output2.='</table>';
$output2.='</form>';
}
else {
$output2.='<div class="my_welcome">Wellcome, '.vB::$vbulletin->userinfo['usertitle'].'!</div>';
$av fetch_avatar_url(vB::$vbulletin->userinfo['userid']);
if (
$av$output2.='<div class="my_avatar"><img src="' .vB::$vbulletin->options['bburl']. '/' .$av[0] . '"/></div>';
else 
$output2.='<div class="my_avatar"><img src="/images/cms/noavatar.jpg"/></div>';
$output2.='<div class="my_link"><a href="private.php">Message';
if (
$GLOBALS['notifications_total']) $output2.=' ('.$GLOBALS['notifications_total'].')';
$output2.='</a></div>';
$output2.='<div class="my_link"><a href="member.php?'.vB::$vbulletin->userinfo['userid'].'-'.vB::$vbulletin->userinfo['username'].'">Profile</a></div>';
$output2.='<div class="my_link"><a href="usercp.php">Settings</a></div>';
$output2.='<div class="my_link"><a href="login.php?do=logout&logouthash='.vB::$vbulletin->userinfo['logouthash'].'" onclick="return log_out(\'Вы дейстивтельно хотите выйти?\')">Log out</a></div>';

}
$output=$output2
Reply With Quote
  #4  
Old 11-23-2011, 05:20 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That code works just fine on my 4.1.8 test site.
Reply With Quote
  #5  
Old 11-24-2011, 04:03 AM
youhack's Avatar
youhack youhack is offline
 
Join Date: Aug 2010
Location: Mother Russia
Posts: 30
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Lynne View Post
That code works just fine on my 4.1.8 test site.
try to create two more widgets
PHP Direct Execution and static HTML code
not only empty, but any code, that error will appear
without additional widgets PHP Direct Execution and static HTML code works fine, no errors
Reply With Quote
  #6  
Old 11-24-2011, 04:28 AM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Actually, the layout I tested it on has 7 widgets on it including one other php direct execution widget and an html widget.
Reply With Quote
  #7  
Old 11-24-2011, 01:55 PM
youhack's Avatar
youhack youhack is offline
 
Join Date: Aug 2010
Location: Mother Russia
Posts: 30
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Lynne, please can customize the widget code from php to html widget statistical?
Reply With Quote
  #8  
Old 11-24-2011, 05:10 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Huh? I'm sorry, but I have no idea what you are asking for.
Reply With Quote
  #9  
Old 11-24-2011, 06:58 PM
youhack's Avatar
youhack youhack is offline
 
Join Date: Aug 2010
Location: Mother Russia
Posts: 30
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I want this widget in html code. is it possible?
widget in php I have an error in code on line 23
If you remove the 23 line, the error is not present, but the avatar does not show
Reply With Quote
  #10  
Old 11-25-2011, 05:04 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You are using php in the widget code, so you can't make it straight html.
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 10:36 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.04275 seconds
  • Memory Usage 2,274KB
  • 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
  • (1)bbcode_code
  • (1)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete