vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=246)
-   -   Miscellaneous Hacks - DJ's Dynamic Tab Content for Postbit_Legacy (https://vborg.vbsupport.ru/showthread.php?t=237867)

FreshFroot 11-06-2010 02:31 AM

If this was made into a product. Wouldn't that then kill all your unknown bugs and let it work properly.

I assume the bugs exist because the forum uses AJAX too? And since it's not a plugin, it counters the forum reply/edit AJAX model.

So if this was a plugin and the right hooks were used, I assume the bugs would not be there anymore?

dcuellar 11-10-2010 02:24 AM

1 Attachment(s)
I've used this before and I went ahead and installed it again.

Attached is a picture of one of my tabs. I'm posting this tab in particular because I've added a function which alerts the user if they do not have that profile field filled and then allows them to click on a link that takes them to edit their profile.

The only one who can see that is the person who posted that particular message. ;)
Everyone else just sees the available profile fields.

Here is the code FOR ONE TAB w/ONE ENTRY (copy and paste entry for more) for those interested. Just insert the appropriate info where you see red:
Code:

<!-- TAB 5 CONTENT --> 
<div id="tab5{vb:raw post.postid}" class="tabcontent"> 

<vb:if condition="$post[fieldX]">
        <div class="eti_postbit"><b>Field Title:</b> <br />{vb:raw post.fieldX}</div>
<vb:else />
        <vb:if condition="$bbuserinfo[userid] == $post['userid']" >
                <div class="eti_postbit"><b>About Me:</b>
                        <br /><p align="center">NO ENTRY. COMPLETE YOUR PROFILE <a href="http://www.xxxxxxxxxx.com/forum/profile.php?do=editprofile">HERE</a>.</p>
                </div>
        </vb:if>
</vb:if>


 
</div>


dcuellar 11-11-2010 06:07 PM

Can anyone tell me what the vbcredits piece of code is? I believe the one listed here is from the old vbcredits.

Does anyone have it for vbCredits II?

Digital Jedi 11-30-2010 11:43 AM

Quote:

Originally Posted by FreshFroot (Post 2118534)
If this was made into a product. Wouldn't that then kill all your unknown bugs and let it work properly.

I assume the bugs exist because the forum uses AJAX too? And since it's not a plugin, it counters the forum reply/edit AJAX model.

So if this was a plugin and the right hooks were used, I assume the bugs would not be there anymore?

Not exactly, what's causing the issue is that when you post in AJAX in vBulletin, your submitting all the code in the postbit template. And that just happens to be where this modification code needs to be to display where it does. JavaScript doesn't post, at least in the research of I've done about it, when going through AJAX. I've seen numerous queries on the web on how to make that happen, but I've not seen any discussions providing a solution. Although, it has been some time since I did my initial research. Even if it were a plugin, the code would still be displayed via AJAX, creating the same issue for you.

Also, I'm looking into doing this into a product. But it doesn't look like it would be anywhere near as flexible as a simple template edit.


Quote:

Originally Posted by dcuellar (Post 2120116)
I've used this before and I went ahead and installed it again.

Attached is a picture of one of my tabs. I'm posting this tab in particular because I've added a function which alerts the user if they do not have that profile field filled and then allows them to click on a link that takes them to edit their profile.

The only one who can see that is the person who posted that particular message. ;)
Everyone else just sees the available profile fields.

Here is the code FOR ONE TAB w/ONE ENTRY (copy and paste entry for more) for those interested. Just insert the appropriate info where you see red:
Code:

<!-- TAB 5 CONTENT --> 
<div id="tab5{vb:raw post.postid}" class="tabcontent"> 

<vb:if condition="$post[fieldX]">
        <div class="eti_postbit"><b>Field Title:</b> <br />{vb:raw post.fieldX}</div>
<vb:else />
        <vb:if condition="$bbuserinfo[userid] == $post['userid']" >
                <div class="eti_postbit"><b>About Me:</b>
                        <br /><p align="center">NO ENTRY. COMPLETE YOUR PROFILE <a href="http://www.xxxxxxxxxx.com/forum/profile.php?do=editprofile">HERE</a>.</p>
                </div>
        </vb:if>
</vb:if>


 
</div>


Okay, I kinda like that. First chance I get, I'll add that to the list of variations on the first page. Thanks.


Quote:

Originally Posted by dcuellar (Post 2120649)
Can anyone tell me what the vbcredits piece of code is? I believe the one listed here is from the old vbcredits.

Does anyone have it for vbCredits II?

I don't have it installed yet, but you should be able to find out from whomever is supporting that now. Check to see if the new code is just a new template displaying via a hook, and you should be able to blank the template and copy the code over to the tabs.

Mobo 12-23-2010 04:41 AM

Opps, wrong thread!

Noser 01-13-2011 06:53 PM

is there any way to get xperience mod into an tab?

if yes, how i didn get it to work, every thing shown in the box is centered.

Noser

OldSchoolDSL 01-13-2011 08:42 PM

A question before I attempt to apply this (as it would clean up my community, nicely)

Has anyone tried this yet on 4.1 PL2 (or 4.1.1) ?

Digital Jedi 01-13-2011 09:35 PM

Quote:

Originally Posted by Noser (Post 2148603)
is there any way to get xperience mod into an tab?

if yes, how i didn get it to work, every thing shown in the box is centered.

Noser

I simply moved the template hook that vBExperience uses into one of the tab containers. If you have other stuff that uses that hook, then you might need to tweak some things. But it should work.

Quote:

Originally Posted by OldSchoolDSL (Post 2148642)
A question before I attempt to apply this (as it would clean up my community, nicely)

Has anyone tried this yet on 4.1 PL2 (or 4.1.1) ?

I have done it, but it does need just a bit of tweaking, as some of the variables in 4.1 changed a bit between versions. I plan on posting that version soon, I'm just trying to get the time to do it along with all my other, er, stuff. :erm:

OldSchoolDSL 01-14-2011 04:30 AM

Quote:

Originally Posted by Digital Jedi (Post 2148666)
I simply moved the template hook that vBExperience uses into one of the tab containers. If you have other stuff that uses that hook, then you might need to tweak some things. But it should work.


I have done it, but it does need just a bit of tweaking, as some of the variables in 4.1 changed a bit between versions. I plan on posting that version soon, I'm just trying to get the time to do it along with all my other, er, stuff. :erm:

Thank you for the quick reply and honestly... Thank you for your willingness to support this further.

I know a lot of the members here seem to only post to report bugs and to complain. And god knows IB releasing so many updates, does not help at all.

So thank you so much for your continued effort. :)

Noser 01-14-2011 01:42 PM

thank you DJ i just have the issue that the bars are centered btw it works well on 4.1 PL2 :)

Greetings
Noser


All times are GMT. The time now is 07:43 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.01182 seconds
  • Memory Usage 1,756KB
  • 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
  • (2)bbcode_code_printable
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete