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 07-25-2014, 09:00 PM
Zoul Zoul is offline
 
Join Date: Nov 2012
Posts: 84
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default variables iD

Hello all

I need help because I wish I could put in a template variable to get information from a nickname and you can change them by changing the id

- Nickname id -
- Id number of messages -
- Id number of subjects -
- Subject or nickname is most active id -
- Last visit nickname id -

I hope to be clear.

TY
Reply With Quote
  #2  
Old 07-25-2014, 09:59 PM
tbworld tbworld is offline
 
Join Date: Oct 2008
Posts: 2,126
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Show your code snippet and we can be more of assistance. As we cannot have a programming discussion without programming code.

Where in the vbulletin code are you adding this template variable?

If you can provide us more information it would be helpful. Thanks.
Reply With Quote
  #3  
Old 07-28-2014, 02:11 PM
Zoul Zoul is offline
 
Join Date: Nov 2012
Posts: 84
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

In fact I'd like to know if there are variables of type
$usernameid=2
ou
{vb:raw username_id2}
ou ?

((it's just an idea example))

we can put in the template to display:
user id 2

I am not so good at coding to create a code.
So I tried to develop a program easiest way (in my level)


to put it simply it is to have a second user spotlight next to the default.

replace one by one the right information to be able to see another user.
because I do not know how to do otherwise
if possible



TY
Reply With Quote
  #4  
Old 07-28-2014, 04:31 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The variable you use for the userid will change depending on what template and/or page you are using it on. so, we need to know what template/page you are wanting to use it on. And, are you wanting the userid of the person viewing the page or some other userid?
Reply With Quote
  #5  
Old 07-28-2014, 06:11 PM
Zoul Zoul is offline
 
Join Date: Nov 2012
Posts: 84
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hello Lynne
The original program is: https://vborg.vbsupport.ru/showthrea...user+spotlight
Then the template used is: dbtech_spotlight_userinfo
It is displayed in: FORUMHOME (<- what's going on box ->)

the original idea would be to add an id (2) box in the program



to go from this:



in that:




to try a bearing my name can change the hack, I went to: dbtech_spotlight_userinfo
and I duplicated the code by creating a table

HTML Code:
<table style="width:100%" border="0"> 
<tr><td> 

<vb:if condition="$use_full_block">
<div>
	<h2 class="blockhead" align="center">{vb:rawphrase dbtech_spotlight}</h2>
	<div class="blockbody formcontrols settings_form_border" id="dbtech_spotlight">

		<div class="blockrow">
<vb:else />

			<div id="wgo_spotlight" class="wgo_subblock section">
				<h3 class="blocksubhead"><img src="{vb:stylevar imgdir_misc}/users_online.png" alt="{vb:rawphrase dbtech_spotlight}" />Membre de la semaine</h3>
				<div>
</vb:if>

				<table cellpadding="0" cellspacing="0" border="0">
				<tr>

				<td width="15">&nbsp;
				</td>

<vb:if condition="$spot_userdata['user_has_pic']">
				<td width="{vb:raw vboptions.dbtech_spotlight_max_width}">
				<img src="{vb:raw spot_userdata['pic']}" alt="User Image" border="0" style="max-height: {vb:raw vboptions.dbtech_spotlight_max_height}px; max-width: {vb:raw vboptions.dbtech_spotlight_max_width}px;">
				</td>

				<td width="15">&nbsp;
				</td>
</vb:if>

				<td width="*">
					<table cellpadding="0" cellspacing="0" border="0">
					<tr>
					<td colspan="2">
					<a href="{vb:raw spot_userdata['userlink']}">{vb:raw spot_userdata['musername']}</a>
					</td>
					</tr>

					<tr>
					<td>
					{vb:rawphrase posts}:
					</td>
					<td width="15">&nbsp;
					</td>
					<td>
					<a href="search.php?do=finduser&amp;userid={vb:raw spot_userdata['userid']}&amp;contenttype=vBForum_Post&amp;showposts=1">{vb:raw spot_userdata['posts']}</a>
					</td>
					</tr>

					<tr>
					<td>
					{vb:rawphrase threads}:
					</td>
					<td width="15">&nbsp;
					</td>
					<td>
					<a href="search.php?do=finduser&amp;userid={vb:raw spot_userdata['userid']}&amp;starteronly=1&amp;contenttype=vBForum_Thread">{vb:raw spot_userdata['threads']}</a>
					</td>
					</tr>

<vb:if condition="$spot_userdata['spot_location']">
					<tr>
					<td>
					{vb:rawphrase field2_title}:
					</td>
					<td width="15">&nbsp;
					</td>
					<td>
					{vb:raw spot_userdata['spot_location']}
					</td>
					</tr>
</vb:if>

<vb:if condition="$spot_userdata['spot_occupation']">
					<tr>
					<td>
					{vb:rawphrase field4_title}:
					</td>
					<td width="15">&nbsp;
					</td>
					<td>
					{vb:raw spot_userdata['spot_occupation']}
					</td>
					</tr>
</vb:if>

<vb:if condition="$spot_userdata['show_reputation']">
					<tr>
					<td>
					{vb:rawphrase reputation}:
					</td>
					<td width="15">&nbsp;
					</td>
					<td>
					{vb:raw spot_userdata['reputation']}
					</td>
					</tr>
</vb:if>

<vb:if condition="$spot_userdata['cust_block_data']">
{vb:raw spot_userdata['cust_block_data']}
</vb:if>

<vb:if condition="$spot_userdata['can_view_forum']">
					<tr>
					<td>
					{vb:rawphrase dbtech_spot_most_active}:
					</td>
					<td width="15">&nbsp;
					</td>
					<td>
					<a href="forumdisplay.php?f={vb:raw spot_userdata['most_active_id']}">{vb:raw spot_userdata['most_active']}</a>
					</td>
					</tr>
</vb:if>

					<tr>
					<td>
					{vb:rawphrase last_activity}:
					</td>
					<td width="15">&nbsp;
					</td>
					<td>
					{vb:raw spot_userdata['user_lastdate']}
					</td>
					</tr>

<vb:if condition="$spot_userdata['spot_signature']">
					<tr>
					<td colspan="3">
					{vb:rawphrase signature}:<br />

					{vb:raw spot_userdata['spot_signature']}
					</td>
					</tr>
</vb:if>

					</table>
				</td>
				</tr>
				</table>

<vb:if condition="$use_full_block">
		</div>
	</div>
</div>
<vb:else />
				</div>
			</div>
</vb:if>

</td><td> 

<vb:if condition="$use_full_block">
<div>
	<h2 class="blockhead" align="center">{vb:rawphrase dbtech_spotlight}</h2>
	<div class="blockbody formcontrols settings_form_border" id="dbtech_spotlight">

		<div class="blockrow">
<vb:else />

			<div id="wgo_spotlight" class="wgo_subblock section">
				<h3 class="blocksubhead"><img src="{vb:stylevar imgdir_misc}/users_online.png" alt="{vb:rawphrase dbtech_spotlight}" />Membre du Mois</h3>
				<div>
</vb:if>

				<table cellpadding="0" cellspacing="0" border="0">
				<tr>

				<td width="15">&nbsp;
				</td>

<vb:if condition="$spot_userdata['user_has_pic']">
				<td width="{vb:raw vboptions.dbtech_spotlight_max_width}">
				<img src="{vb:raw spot_userdata['pic']}" alt="User Image" border="0" style="max-height: {vb:raw vboptions.dbtech_spotlight_max_height}px; max-width: {vb:raw vboptions.dbtech_spotlight_max_width}px;">
				</td>

				<td width="15">&nbsp;
				</td>
</vb:if>

				<td width="*">
					<table cellpadding="0" cellspacing="0" border="0">
					<tr>
					<td colspan="2">
					<a href="{vb:raw spot_userdata['userlink']}">{vb:raw spot_userdata['musername']}</a>
					</td>
					</tr>

					<tr>
					<td>
					{vb:rawphrase posts}:
					</td>
					<td width="15">&nbsp;
					</td>
					<td>
					<a href="search.php?do=finduser&amp;userid={vb:raw spot_userdata['userid']}&amp;contenttype=vBForum_Post&amp;showposts=1">{vb:raw spot_userdata['posts']}</a>
					</td>
					</tr>

					<tr>
					<td>
					{vb:rawphrase threads}:
					</td>
					<td width="15">&nbsp;
					</td>
					<td>
					<a href="search.php?do=finduser&amp;userid={vb:raw spot_userdata['userid']}&amp;starteronly=1&amp;contenttype=vBForum_Thread">{vb:raw spot_userdata['threads']}</a>
					</td>
					</tr>

<vb:if condition="$spot_userdata['spot_location']">
					<tr>
					<td>
					{vb:rawphrase field2_title}:
					</td>
					<td width="15">&nbsp;
					</td>
					<td>
					{vb:raw spot_userdata['spot_location']}
					</td>
					</tr>
</vb:if>

<vb:if condition="$spot_userdata['spot_occupation']">
					<tr>
					<td>
					{vb:rawphrase field4_title}:
					</td>
					<td width="15">&nbsp;
					</td>
					<td>
					{vb:raw spot_userdata['spot_occupation']}
					</td>
					</tr>
</vb:if>

<vb:if condition="$spot_userdata['show_reputation']">
					<tr>
					<td>
					{vb:rawphrase reputation}:
					</td>
					<td width="15">&nbsp;
					</td>
					<td>
					{vb:raw spot_userdata['reputation']}
					</td>
					</tr>
</vb:if>

<vb:if condition="$spot_userdata['cust_block_data']">
{vb:raw spot_userdata['cust_block_data']}
</vb:if>

<vb:if condition="$spot_userdata['can_view_forum']">
					<tr>
					<td>
					{vb:rawphrase dbtech_spot_most_active}:
					</td>
					<td width="15">&nbsp;
					</td>
					<td>
					<a href="forumdisplay.php?f={vb:raw spot_userdata['most_active_id']}">{vb:raw spot_userdata['most_active']}</a>
					</td>
					</tr>
</vb:if>

					<tr>
					<td>
					{vb:rawphrase last_activity}:
					</td>
					<td width="15">&nbsp;
					</td>
					<td>
					{vb:raw spot_userdata['user_lastdate']}
					</td>
					</tr>

<vb:if condition="$spot_userdata['spot_signature']">
					<tr>
					<td colspan="3">
					{vb:rawphrase signature}:<br />

					{vb:raw spot_userdata['spot_signature']}
					</td>
					</tr>
</vb:if>

					</table>
				</td>
				</tr>
				</table>

<vb:if condition="$use_full_block">
		</div>
	</div>
</div>
<vb:else />
				</div>
			</div>
</vb:if>


</tr></table>


and here is the result:




as you can see, the idea is to display a user selected (as prog default) right


either by modifying the program
or by changing the variables by default variables can be customized by the id for each information


I'm fairly complete?
Reply With Quote
  #6  
Old 07-29-2014, 04:12 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Your best bet would be to ask this question in the modification thread as the users there would know the variables to use.
Reply With Quote
  #7  
Old 07-29-2014, 07:32 PM
Zoul Zoul is offline
 
Join Date: Nov 2012
Posts: 84
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hello Lynne

I requested a change (improvement program) and for them to program is designed for one person. So no update possible.

I'm going to see if this new idea are willing to help so I drew improve the program.

Create a hack update, addon, is it complicated to do?

thank you
Reply With Quote
  #8  
Old 07-29-2014, 09:30 PM
Scanu's Avatar
Scanu Scanu is offline
 
Join Date: Nov 2010
Posts: 829
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Do you have any experience in programming? If not then it could be hard
Reply With Quote
  #9  
Old 07-30-2014, 03:08 AM
Zoul Zoul is offline
 
Join Date: Nov 2012
Posts: 84
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Unfortunately not.
Just css (much experience)
and html (less)

Thank you for your answers
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 05:18 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.04193 seconds
  • Memory Usage 2,295KB
  • Queries Executed 13 (?)
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_html
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (9)post_thanks_box
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (9)post_thanks_postbit_info
  • (9)postbit
  • (9)postbit_onlinestatus
  • (9)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_postinfo_query
  • fetch_postinfo
  • 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