Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.5 > vBulletin 3.5 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Timezone Image In Profile Details »»
Timezone Image In Profile
Version: 1.5, by Nutz Nutz is offline
Developer Last Online: Dec 2013 Show Printable Version Email this Page

Version: 3.5.4 Rating:
Released: 11-22-2005 Last Update: 12-05-2005 Installs: 107
Uses Plugins Template Edits
 
No support by the author.

Timezone Image In Profile

Description
This plug-in will allow you to have a world timezone image in user profile view.(see screenshot).

Details
  • 1 Product
  • 1 Phrase
  • 1 Template Modification

Notes
Requires 1 small template modification to MEMBERINFO.
The time zone image is selected from the users Timezone options.

History
1.0
Initial Version

1.5
Time and date is imprinted on the timezone image.

1.5.1
Some stupid mistakes by me o_O

Last Words
I hope you enjoy the hack!
And don't forget to click install please



Thanks,
Mat

Supporters / CoAuthors

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #22  
Old 11-24-2005, 01:55 AM
dieselpowered's Avatar
dieselpowered dieselpowered is offline
 
Join Date: Aug 2004
Location: Arizona
Posts: 661
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

So then it would be correct to assume that this hack makes a query to the db? Is there anyway to get rid of that query?
Reply With Quote
  #23  
Old 11-24-2005, 05:50 AM
rb290's Avatar
rb290 rb290 is offline
 
Join Date: Oct 2005
Posts: 333
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hmmm i got another hack installed: The Awards Hack
this is what the MEMBERINFO looks like when i go to edit
with the </table> $footer at the bottom
PHP Code:
<!-- Award detail list -->
<if 
condition="$show['userawards']">
<
a name="award"></a>
<
br>
<
table class="tborder" cellpadding="$stylevar[cellpadding]cellspacing="$stylevar[cellspacing]border="0" width="100%" align="center">
    <
tr>
        <
td class="tcat" colspan="3" align="center">$vbphrase[award_showcase]</td>
    </
tr>
    <
tr>
<if 
condition="$vboptions[aw_showicon]">
        <
td class="thead" nowrap>$vbphrase[award_icon]</td>
</if>
<if 
condition="$vboptions[aw_showimage]">
        <
td class="thead" nowrap>$vbphrase[award_image]</td>
</if>
        <
td class="thead" width="100%">$vbphrase[award_description]</td>
    </
tr>
    
$userawardslistbits
</table>
</if>
<!-- /
Award detail list -->

$footer 
Reply With Quote
  #24  
Old 11-24-2005, 05:54 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by ConqSoft
In the plugin, change this:

Code:
		SELECT timezoneoffset
		FROM " . TABLE_PREFIX . "user
		WHERE user.userid =
To this:

Code:
		SELECT timezoneoffset
		FROM " . TABLE_PREFIX . "user
		WHERE " . TABLE_PREFIX . "user.userid =
No, that is wrong. user.userid is NOT a table. The original code is correct.
Reply With Quote
  #25  
Old 11-24-2005, 05:59 AM
ConqSoft's Avatar
ConqSoft ConqSoft is offline
 
Join Date: Jul 2003
Location: Raleigh, NC
Posts: 686
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Umm. user is a table. In his case, it should have been the following, and my listed code change would correct it.

Code:
SELECT timezoneoffset
FROM vb3_user
WHERE vb3_user.userid = 1;
Reply With Quote
  #26  
Old 11-24-2005, 06:09 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by ConqSoft
Umm. user is a table. In his case, it should have been the following, and my listed code change would correct it.

Code:
SELECT timezoneoffset
FROM vb3_user
WHERE vb3_user.userid = 1;
You're missing the point. Yes, user IS a table, but user.userid is not. It is a column of that table. The original code is correct, sorry.
Reply With Quote
  #27  
Old 11-24-2005, 06:16 AM
ConqSoft's Avatar
ConqSoft ConqSoft is offline
 
Join Date: Jul 2003
Location: Raleigh, NC
Posts: 686
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Then explain his error:

SELECT timezoneoffset
FROM vb3_user
WHERE user.userid = 1;

MySQL Error : Unknown table 'user' in where clause

When you reference user.userid you ARE referencing the user table. He doesn't have a user table. He has a vb3_user table. So, it needs to be vb3_user.userid. Or, alternatively, leaving the table off completely and just using userid should work too, since there's only one userid field and there should be no ambiguity.

I don't program in PHP (ASP instead), but I do SQL work for a living, so I know how to reference tables and fields therein.

xtremeoff-road,
Did adding the prefix fix your problem?
Reply With Quote
  #28  
Old 11-24-2005, 06:40 AM
Nutz's Avatar
Nutz Nutz is offline
 
Join Date: Aug 2004
Location: United Kingdom
Posts: 436
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by xtremeoff-road
So then it would be correct to assume that this hack makes a query to the db? Is there anyway to get rid of that query?
Not at the moment but its only one query extra for member view

Quote:
hmmm i got another hack installed: The Awards Hack
Can you post A link please.

@The SQL error: I fail to see why you would need the TABLE_PREFIX in the where statement take function "fetch_avatar_url"

[sql]
WHERE user.userid = $userid
[/sql]
But if adding the table prefix works then i will change the product :/

Thanks,
Mat
Reply With Quote
  #29  
Old 11-24-2005, 06:53 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by ConqSoft
Then explain his error:

SELECT timezoneoffset
FROM vb3_user
WHERE user.userid = 1;

MySQL Error : Unknown table 'user' in where clause

When you reference user.userid you ARE referencing the user table. He doesn't have a user table. He has a vb3_user table. So, it needs to be vb3_user.userid. Or, alternatively, leaving the table off completely and just using userid should work too, since there's only one userid field and there should be no ambiguity.

I don't program in PHP (ASP instead), but I do SQL work for a living, so I know how to reference tables and fields therein.

xtremeoff-road,
Did adding the prefix fix your problem?
Well, adding that isn't going to fix the problem. You are calling a column from a table, and in that sense you wouldn't use a table prefix on a column.
Reply With Quote
  #30  
Old 11-24-2005, 12:57 PM
Mastar's Avatar
Mastar Mastar is offline
 
Join Date: Sep 2005
Posts: 680
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I don't see it in my usercp options nor in the admincp
Reply With Quote
  #31  
Old 11-24-2005, 01:44 PM
ConqSoft's Avatar
ConqSoft ConqSoft is offline
 
Join Date: Jul 2003
Location: Raleigh, NC
Posts: 686
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Boofo
You are calling a column from a table, and in that sense you wouldn't use a table prefix on a column.
You're not getting it... You're trying to call a column from a table that DOES NOT EXIST though.

user.userid.

The first part, user, defines the table to look for the second part, userid, which is the fieldname.
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:39 AM.


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.04538 seconds
  • Memory Usage 2,329KB
  • Queries Executed 26 (?)
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
  • (4)bbcode_code
  • (1)bbcode_php
  • (6)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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