vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=134)
-   -   Default or Retro (https://vborg.vbsupport.ru/showthread.php?t=88792)

Zachery 03-28-2004 10:00 PM

Default or Retro
 
This will super simple mod will allow your users to have either a new styled vB3 postbit or the old vB2 postbit with out using phpinclude_start OR hacking :)


Step 1
Add a new profile field that is a single selction menu
Title: Postbit Style
Description: How all postbits will appear to you.
Options:
Default
Legacy

OR

Legacy
Default

(depending on WHICH you want to be default)
Default: Yes but not blank.

Now, Im going to assume you have NOT modifed your postbit template much and give you 2 predone full template bits, ill also give you 2 non predone bits that you must fill in for your self.

You need to chage the top line of any of the text files to make sure you have the number of the profile field replaced for X.

:)

Bad Bunny 03-29-2004 12:37 PM

Yay! So simple, and so smart. Thanks!
I will surely encorporate this into my forums in some way.

Nhat_Long 03-30-2004 11:14 PM

please to post demo
thanks

alwafi 04-07-2004 11:49 PM

it's very nice

thanks

D7MeEe 04-09-2004 05:46 PM

Quote:

Originally Posted by alwafi
it's very nice

thanks

أحم أحم

Brad 04-13-2004 05:47 AM

This will also avoid that extra query kura's hack takes care of.

cavola 04-23-2004 06:37 PM

OK please tell me what exactly to do!? This isnt very helpful...

what exactly are the 3 attached files?!

Zachery 04-23-2004 06:59 PM

Basicly, there are 3 attached files,

The first is the regular vB3 new styled postbit as the default
The second is the Old vB2 styled postbit as the default
the thrid is if you have heavily modifed one or the other and just the conditions to use.

cavola 04-23-2004 07:39 PM

Ah ok, but where will the users be able to change this in their profile?

Zachery 04-23-2004 07:41 PM

Quote:

Step 1
Add a new profile field that is a single selction menu
Title: Postbit Style
Description: How all postbits will appear to you.
Options:
Default
Legacy

OR

Legacy
Default

(depending on WHICH you want to be default)
Default: Yes but not blank.
You read the instructions ;)

cavola 04-24-2004 01:28 PM

I did, sorry to sound rude.

I mean i have added this profile but where in the User CP can i find it?

Zachery 04-24-2004 06:28 PM

Try UserCP > Edit Profile.

OGT 04-25-2004 04:58 AM

Might want to add, if i understand this correctly, any future mods to postbit where you would modify postbit and postbit_legacy would now be done 2 times to each section of this new postbit: once in the default section, then again in the legacy section. the postbit_legacy would be ignored completely.

imported_Keyser S?ze 05-15-2004 11:00 PM

worked like a charm, took some figureing out tho, guys need to remeber some of us are really dlow witted ppl ;p

here is a quick explination of how to do it for the other slow folks around here

open the admin cp and scroll down to edit profile fields, follow th einstructions in the 1st post on that, look at it when ur done and remeber what it says next to feild (will prolly say field5)

go edit ur templates, ur going to replace 2 templates, the "postbit" template (replace that with the default.txt file) and the postbit_legacy template (replace with the legacy.txt file


thats it, pretty easy

-edit-

how would i go about making the postbit width (avatar side) noot be so wide? i dont need it that wide (legacy)

imported_Keyser S?ze 05-18-2004 07:03 AM

worked fine on my test forum, now on my main one when i install it i get this error

The following error occurred when attempting to evaluate this template:

Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' in /home/virtual/site1/fst/var/www/html/forums/includes/adminfunctions_template.php(3037) : eval()'d code on line 5

This is likely caused by a malformed conditional statement. It is highly recommended that you fix this error before continuing, but you may continue as-is if you wish.

Zachery 05-18-2004 07:46 AM

Sounds like you didnt finish the conditional somewhere...

imported_Keyser S?ze 05-18-2004 09:29 AM

i dont understand, i didnt hack the postbit at all so i just used the standard, and i changed the feildX, what else besides making the profile field am i suppose to do?

Zachery 05-18-2004 09:37 AM

Double check all your if statments, if it is not closed properly it will mess it up

imported_Keyser S?ze 05-18-2004 09:09 PM

one thing that is diffrent the filed is 7, it was 5 on the other, the test forum i have is just a plain install, this one is a upgrade from vb2, i think maybe the other feild is a hack, but its not listed

any idea, i at one point had the hack profile custom feild installed

imported_Keyser S?ze 05-19-2004 02:28 AM

i fixed it , my own fault

thanks for the help

ImportPassion 06-06-2004 08:14 PM

ok, now I am getting that parse error. wtf is going on? This is not that difficult to do. individually they save fine, together they don't
PHP Code:

<if condition="$bbuserinfo[field60] == Default">
<!-- new 
postbit -->
<!-- 
end new postbit -->
<else />
<!-- 
legacy postbit -->
<!-- 
end legacy postbit -->
</if> 


ImportPassion 06-06-2004 08:24 PM

well, looks like it was a typo in the no code template.

you have
<if condition="$bbuserinfo[field60] == Legacy">

should be
<if condition="$bbuserinfo[field60] == 'Legacy'">

Zachery 06-07-2004 01:38 PM

No it shouldnt you should never use single quotes inside of conditionals.

ImportPassion 06-07-2004 01:39 PM

only way i could get it to work and it does really work.

MegaHertz 06-11-2004 03:45 PM

Zachery,

Nice work as usual. :)

MegaHertz 07-03-2004 12:02 AM

Zachery,

Is there anything that needs to be done in light of 3.0.2?

I noticed that the postbit_legacy template is listed as needing to be reverted.

Thanks

Zachery 07-03-2004 12:46 AM

If you revert it, it should still work if you reapply the mod

MegaHertz 07-03-2004 12:52 AM

IIRC your text files contain the complete contents of the template.

Won't there be some code that needs to be added or am I thinking about this the wrong way?

Thanks again.

MegaHertz 07-03-2004 12:57 AM

Disregard it tells me all of my templates are up to date.

escoson 11-23-2004 11:04 PM

dope thanks!

Hexemer 11-25-2004 09:35 AM

Hello,

how can I use this in a custom style?

GetGamer.com 01-01-2005 07:31 PM

Quote:

Originally Posted by Zachery
No it shouldnt you should never use single quotes inside of conditionals.

I had to do the same thing to get it working on my site.

Also, if I understand this code correctly, I don't really need to edit both postbit templates. I can edit the one template I've configured vBulletin to use (Default in my case), since the Legacy Postbit is not called or configured. Or am I missing something?

DefenceTalk 01-17-2005 04:58 PM

Maybe I am doing something wrong.

I got field options appearing in user Cp but changing the options doesn't do anything.... :(

Gutspiller 08-01-2005 07:52 PM

I am running 3.0.7 (Will this work on it?)and don't want to use your prepostbit files, so I'm using the 3rd. Umm, where do I place the code in the 3rd text file?

Also, do I need to include both parts? The stuff above and the stuff below the "OR" or is it both of them? Are you saying "OR" or is that part of the code?

Gutspiller 08-02-2005 03:18 PM

OK, I tried it and I can't get it to work on 3.0.7, it errors out when trying to save the postbit. Can somebody help getting this hack working on 3.0.7 please.

GeekFury 11-05-2005 03:22 PM

will this work with 3.5 or is there another option?


All times are GMT. The time now is 04:44 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.01458 seconds
  • Memory Usage 1,780KB
  • 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)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (36)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