vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB5 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=263)
-   -   How to add variable from user table to template (https://vborg.vbsupport.ru/showthread.php?t=328519)

NovoCiv 01-14-2021 09:52 PM

How to add variable from user table to template
 
Today I had to upgrade from vBulletin 4.0.5 to the latest 5.6.4 due to the server forcing me into the modern world with PHP 7.4.

All of my 10+ years of custom code and modifications is lost. I hate it but that's life.

I just want to recover the ucash balances (which are in the user table in the database) and display them under posts. I know that doing things like earning new points for posting and trading points isn't going to happen. It seems like vbulletin 5 is not easy to mod.

But for the sake of preserving our history, I just want to show the ucash balances.

Can someone help me with how I would do this in a template edit? Everything I know from vBulletin 4 is outdated.

shka 01-15-2021 12:17 AM

Which table columns and where / how to display (screenshot from old system)?

NovoCiv 01-15-2021 06:59 AM

The ucash column of the user table. I can't make screenshots of the old system because it became unusable when PHP was updated, and now the forums are on 5.6.4.

Ucash is just a float value.

shka 01-15-2021 09:38 AM

If you don't have a screenshot - you should describe where you want to show it. This is not a default vbulletin field, I don't know the meaning of it.

Screenshot of actual board and paint where what.

Or anyone other who knows which mod this field published

NovoCiv 01-15-2021 11:17 PM

https://i.imgur.com/nfzko2J.png

I want to just put a line below posts: #
I found the template conversation_userinfo and i can put static text there, but not the variable that shows the points balance from the ucash column of the user table.

In vb4 I could do it on the postbit_legacy template.
The ucash mod can be found here
https://vbulletin.org/forum/showthread.php?t=227910

I couldn't find any points mod for vb5.



As a side note i wouldn't mind getting rid of those ugly Facebook/twitter share buttons too.


All times are GMT. The time now is 04:46 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.00921 seconds
  • Memory Usage 1,717KB
  • 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
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)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