vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Styles (https://vborg.vbsupport.ru/forumdisplay.php?f=247)
-   -   Forum Style - Lightweight Style for Small Screen Devices (cell phone, iphone, mobile, android) (https://vborg.vbsupport.ru/showthread.php?t=249277)

@ngel 01-24-2013 09:45 AM

Thank you for your response!
I have 4.1.5 and I do allow users to change style!

dartho 01-25-2013 10:58 AM

Quote:

Originally Posted by @ngel (Post 2399135)
Thank you for your response!
I have 4.1.5 and I do allow users to change style!

try editing the footer template and change teh "-1" in the following:

<a href="?styleid=-1">Default Style</a>

to the styleid number of your default style

@ngel 01-25-2013 02:17 PM

Nothing... neither with -1 or 3

tareqbd 01-28-2013 12:45 AM

Need help to make dbtech credit deluxe work with this style. Seems onclick the charged contents are not loading. Advise appreciated.

djbaxter 01-28-2013 02:26 AM

DBTech add-ons don't play nicely with a lot of other add-ons. You may be further ahead looking for a replacement for whatever add-on is conflicting with this one.

Alan_SP 01-29-2013 12:48 AM

This is not true, especially as we a talking about custom (mobile) skin.

Thing is, there are hooks that are missing and certainly not some coding problem with DBTech mod per se. If you want, you could ask what hooks you need to add, but with adding hooks, style becomes less mobile, which beats it purpose.

Courty 02-07-2013 11:20 PM

Dartho,
first of all, thanks for creating this mod. The Lightweight style is super-popular on my forum.

Now, I have a (minor) issue with users inadvertently hitting the 'report button instead of 'reply'. So my question is this: how do I reorder the buttons below each post?

Disclaimer: Apologies if the info is already in here somewhere. I did do some searching of this thread but have to date been unable to find the answer I am looking for.

dartho 02-08-2013 12:58 AM

edit the postbit and/or postbit_legacy templates and you should find the report post button code in there pretty easily - just move it where you want, or even remove it

Courty 02-09-2013 11:13 PM

Quote:

Originally Posted by dartho (Post 2402772)
edit the postbit and/or postbit_legacy templates and you should find the report post button code in there pretty easily - just move it where you want, or even remove it

Thanks! Worked a treat.

Courty 02-11-2013 10:21 AM

Hmmm, another quick question for Dartho or anyone else who speaks code, apologies if this should be in another thread.

If possible, I would like to align the 'Report' and 'Infraction' button to the left side, and the 'Reply' and 'Edit' buttons to the right. I worked out how to do it using a new div tag, but that pushed the right side onto a new line (which I don't want).

Here's what I'm working with, is there an easy mod to make this work?

Code:

<div class="{vb:raw post.statustitle}windowbg2" id="post{vb:raw post.postid}">
<a name="post{vb:raw post.postid}"></a>
<a href="{vb:link member, {vb:raw post}}">{vb:raw post.username}</a> {vb:raw post.posttime} {vb:raw post.postdate}
<vb:if condition="$show['avatar']"><br />
                                        <a href="{vb:link member, {vb:raw post}}" title="{vb:rawphrase {vb:raw post['onlinestatusphrase']}, {vb:raw post.username}}">
                                        </a>
                                </vb:if>
</div>

<div class="windowbg">{vb:raw post.message}<br /><br />

                <!-- attachments -->
                <vb:if condition="$show['attachments']">
                        <div><span>Attached: </span>
                        <vb:if condition="$show['thumbnailattachment']">
                                        <span>{vb:raw post.thumbnailattachments}<br /></span>
                        </vb:if>
               
                        <vb:if condition="$show['imageattachment']">
                                        <span>{vb:raw post.imageattachments}<br /></span>
                        </vb:if>
                       
                        <vb:if condition="$show['imageattachmentlink']">
                                        <span>{vb:raw post.imageattachmentlinks}<br /></span>
                        </vb:if>
                       
                        <vb:if condition="$show['otherattachment']">
                                        <span>{vb:raw post.otherattachments}<br /></span>
                        </vb:if>
                       
                        <vb:if condition="$show['moderatedattachment']">
                                        <span>{vb:raw post.moderatedattachments}<br /></span>
                        </vb:if>
                       
                        </div>
                <!-- / attachments -->
                </vb:if>
<vb:if condition="$show['reportlink']"><a id="btn" href="{vb:raw post.reportlink}" rel="nofollow">{vb:rawphrase report_bad_post}</a></vb:if>
<vb:if condition="$show['infractionlink']">
<vb:if condition="$post['editlink']"><a id="btn" href="{vb:raw post.editlink}">{vb:rawphrase edit}</a></vb:if>
<vb:if condition="$post['replylink']"><a id="btn" href="{vb:raw post.replylink}" id="qrwq_{vb:raw post.postid}" rel="nofollow">{vb:rawphrase reply}</a></vb:if>
<a id="btn" href="infraction.php?{vb:raw session.sessionurl}do=report&amp;p={vb:raw post.postid}" rel="nofollow" title="{vb:rawphrase add_infraction_for_x, {vb:raw post.username}}">Infraction</a>
</vb:if>
<vb:if condition="$show['redcard']">
<a class="redcard" href="infraction.php?{vb:raw session.sessionurl}do=view&amp;p={vb:raw post.postid}" rel="nofollow" title="{vb:rawphrase received_infraction}"><img border="0" src="{vb:stylevar imgdir_button}/red-card_sm.png" alt="{vb:rawphrase received_infraction}" /></a>&nbsp;
<vb:elseif condition="$show['yellowcard']" />
<a class="yellowcard" href="infraction.php?{vb:raw session.sessionurl}do=view&amp;p={vb:raw post.postid}" rel="nofollow" title="{vb:rawphrase received_warning}"><img border="0" src="{vb:stylevar imgdir_button}/yellow-card_sm.png" alt="{vb:rawphrase received_warning}" /></a>
</vb:if>

</div>
        <vb:if condition="$post['isfirstshown']">
                {vb:raw ad_location.ad_showthread_firstpost_start}
                {vb:raw ad_location.thread_first_post_content}
        </vb:if>
        <vb:if condition="$post['islastshown']">
                {vb:raw ad_location.thread_last_post_content}
        </vb:if>


dartho 02-11-2013 01:25 PM

You'll need to float one of the divs

SolidSnakeLive 02-14-2013 06:46 PM

Last Update: 16 Dec 2011

Add new update its the best mobile style

tareqbd 03-10-2013 03:33 AM

Quote:

Originally Posted by Alan_SP (Post 2400208)
This is not true, especially as we a talking about custom (mobile) skin.

Thing is, there are hooks that are missing and certainly not some coding problem with DBTech mod per se. If you want, you could ask what hooks you need to add, but with adding hooks, style becomes less mobile, which beats it purpose.

Thank you. I have contacted DBT, they advised as below:
Quote:

showthread_below_posts is needed for the JS code that powers charged content.
Help appreciated.

dartho 03-12-2013 10:58 PM

edit the SHOWTHREAD template,
search for (near the bottom of the template)
Code:

{vb:raw footer}
and add the following immediately above it

Code:

{vb:raw template_hook.showthread_below_posts}

Dwarden 03-17-2013 10:05 PM

very nice style, do you plan release updated version for 4.2.0 pl3 ?

Marco Aurelio 03-18-2013 03:24 PM

Hi dartho, thanks for your lightweight!

Please, help me! :D In vBulletin 4.2, this:

{vb:raw post.post_thanks_bit}

doesn't work! How can I fix?

K4GAP 03-18-2013 08:08 PM

I have but one question before I install this. How is it better than the standard vb mobile style?

Thanks for your effort and work.

Alan_SP 03-18-2013 10:14 PM

Well, I think that you should install it and see differences for yourself.

In my opinion, dartho's style is much better, I use it when I'm on mobile internet and don't need vB mobile style at all. But, it all comes down to your own tastes.

Filgga 03-19-2013 04:45 PM

Quote:

Originally Posted by etca (Post 2320223)
dear dartho,

how to fix this? my vbul. 4.1.12

2. empty page, there are no 1, 2, 3 ... . see the attachment.

How did you solve this?

dartho 03-19-2013 11:15 PM

Quote:

Originally Posted by Filgga (Post 2410990)
How did you solve this?

Looks like he did here:
https://vborg.vbsupport.ru/showthrea...46#post2322346

Hippy 03-20-2013 02:23 AM

Quote:

Originally Posted by Marco Aurelio (Post 2410795)
Hi dartho, thanks for your lightweight!

Please, help me! :D In vBulletin 4.2, this:

{vb:raw post.post_thanks_bit}

doesn't work! How can I fix?

search post thanks in this thread youll find the code for the whole mod to work..

K4GAP 03-20-2013 04:43 AM

Quote:

Originally Posted by Alan_SP (Post 2410870)
Well, I think that you should install it and see differences for yourself.

In my opinion, dartho's style is much better, I use it when I'm on mobile internet and don't need vB mobile style at all. But, it all comes down to your own tastes.

In most cases that is exactly what I do. But usually an alternative will have listed advantages i.e. does this or that work or look better than the original.

dartho 03-20-2013 04:52 AM

Quote:

Originally Posted by GaryT (Post 2411104)
In most cases that is exactly what I do. But usually an alternative will have listed advantages i.e. does this or that work or look better than the original.

There is no comparison as there was no vBulletin mobile style when I made this one. I'm not sure if vBulletin listed advantages / comparisons to this one when they release their alternative though :)

Marco Aurelio 03-20-2013 11:22 AM

Quote:

Originally Posted by Hippy (Post 2411093)
search post thanks in this thread youll find the code for the whole mod to work..

Sorry, but this:

Quote:

Originally Posted by dartho (Post 2305643)
Integrating Abe1's post thanks add-on into the lightweight style.

replace the following templates with the code provided (in the lightweight style only!!)
post_thanks_box
Code:

<if condition="$post_thanks_box"><div class="windowbg" id="post_thanks_box_$post[postid]">$post_thanks_box</div></if>
post_thanks_button
Code:

<a id="btn" href="post_thanks.php?{vb:raw session.sessionurl}do=post_thanks_add&amp;p={vb:raw post.postid}&amp;securitytoken={vb:raw bbuserinfo.securitytoken}" id="post_thanks_button_{vb:raw post.postid}"<vb:if condition="$vboptions[disable_ajax] != 2"> onclick="return post_thanks_give({vb:raw post.postid}, <vb:if condition="$vboptions[post_groan_integrate]">true<vb:else />false</vb:if>);"</vb:if> <vb:if condition="$display_thanks_image == 'none'">style="display:none"</vb:if> rel="nofollow" class="post_thanks_button">{vb:rawphrase post_thanks_thanks}</a>
post_thanks_postbit
Code:

<vb:if condition="$post['post_thanks_amount'] == 1">
                        {vb:rawphrase post_thanks_user_says, {vb:raw post.username}}
                <vb:else />
                        {vb:rawphrase post_thanks_users_say, {vb:raw post.post_thanks_amount_formatted}, {vb:raw post.username}}
                </vb:if>
{vb:raw post.post_thanks_bit}


Edit both the postbit & postbit_legacy templates as follows

Search for:
Code:

<vb:if condition="$post['editlink']"><a id="btn" href="{vb:raw post.editlink}">{vb:rawphrase edit}</a></vb:if>
Add the following immediately above:
Code:

{vb:raw template_hook.postbit_controls}
Then go to end of template and paste in:
Code:

{vb:raw template_hook.postbit_end}
and your done!

doesn't work after upgrade to vBulletin 4.2, because I don't see {vb:raw post.post_thanks_bit}. I write that code in template, but it doesn't appear on forum, so I don't know who thanked.

dartho 03-20-2013 02:29 PM

You haven't really given us enough info to help, but I would guess you need to redo the post bit template edits

Hippy 03-20-2013 10:50 PM

Quote:

Originally Posted by Marco Aurelio (Post 2411136)
Sorry, but this:



doesn't work after upgrade to vBulletin 4.2, because I don't see {vb:raw post.post_thanks_bit}. I write that code in template, but it doesn't appear on forum, so I don't know who thanked.

still works for me ..
check your work over

Filgga 03-25-2013 07:23 AM

Quote:

Originally Posted by dartho (Post 2411059)

There's no direct fix for this? I've some customizations made and re-installing the same to fix this minor bug seems to be painful

:confused:

BTW, have you managed to get vBSEO Like system compatible with it?

dartho 03-25-2013 10:46 PM

Sorry but I I don't have vbseo so can not look at this. But if it is just a matter of some hooks needing to be added to templates it would be trivial to do if you could find out which hooks are used by the vbseo hack.

You could export the style from your site, including your customisations, and re-install that as per the suggested 'fix' ?

Filgga 03-26-2013 08:23 AM

Quote:

Originally Posted by dartho (Post 2412290)
Sorry but I I don't have vbseo so can not look at this. But if it is just a matter of some hooks needing to be added to templates it would be trivial to do if you could find out which hooks are used by the vbseo hack.

Yeah, loud n clear ;)

Quote:

You could export the style from your site, including your customisations, and re-install that as per the suggested 'fix' ?
Yep, this fixes the problem but another problem rises:
1. If installed as a Standard skin, then the error is fixed!
2. If installed as a mobile skin, the same error comes

Problem: Using vB's default style assignment the theme doesn't appear to be selective under Settings > Options > Style & Language Settings (for mobile themes)

I bet, this' not your fault. vB team was supposed to allow any skin from standard to mobile can be selected to be assigned for mobile users. I see no point of forcing someone to categorize them (IMHO)

What's your suggestion?

dartho 03-27-2013 03:25 AM

vBulletin messed things up for this style when the seperated mobile and standard styles.

If you want to use VB detection and simply apply one style to advanced mobile devices, one style to basic mobile devices and a default style to everyone and allow people to select their own style (assuming they are already allowed to do this on your site) and still allow admin to pick any style they want, the following should do it.

Create a plugin on style_fetch with the following code being sure to enter in teh styleids you want for mobile, advanced mobile and default styles:

PHP Code:

//VB has already check and set cookies if the user can skip the style, so just read what they wrote
$vbulletin->input->clean_array_gpc('c', array(
    
COOKIE_PREFIX 'userstyleid'     => TYPE_INT,
    
COOKIE_PREFIX 'skipmobilestyle' => TYPE_BOOL,
));
$skip $vbulletin->GPC[COOKIE_PREFIX 'skipmobilestyle'];
//Admin can have any style they want, so check if they're an admin and have specificed a styleid
if ($vbulletin->userinfo['permissions']['adminpermissions'])
{
$vbulletin->input->clean_gpc('r''styleid'TYPE_INT);
$styleid $vbulletin->GPC['styleid'];
}
else if (
$skip)
//if the user is not an admin has chosen to skip the mobile style (if allowed) give them default
$styleid=$vbulletin->GPC[COOKIE_PREFIX 'userstyleid'];
else if (
$vbulletin->mobile_browser_advanced
$styleid=20;  //Advanced mobile style ID
else if ($vbulletin->mobile_browser)
$styleid=7;   //Basic mobile style ID
else 
$styleid=1;  //everyone else gets default style default style 


dartho 03-27-2013 03:47 AM

If you wanted to make this simpler, and don;t mind going into debug mode on your site, you could edit the Option Code for Mobile Style boxes in AdminCP so that all styles (both mobile and standard) show up and then you could replace the styleid numbers in the plugin above with $vbulletin->options['mobilestyleid_basic'], $vbulletin->options['mobilestyleid_advanced'] and $vbulletin->options['styleid'] then if you changed styles down the track you wouldn;t need to edit the plugin by hand. You would still need the above plugin to make it work.

To do this change the Option Code to:
PHP Code:

select:eval
//options = fetch_style_title_options_array('', false, 'mobile');
$options fetch_style_title_options_array();
$options = array('0' => $vbphrase['none']) + $options


Filgga 03-27-2013 03:59 AM

Quote:

Originally Posted by dartho (Post 2412496)
To do this change the Option Code to:
PHP Code:

select:eval
//options = fetch_style_title_options_array('', false, 'mobile');
$options fetch_style_title_options_array();
$options = array('0' => $vbphrase['none']) + $options


Superb! I know, many will benefit from this... Do I add the code onto the above code and look like:
PHP Code:

//VB has already check and set cookies if the user can skip the style, so just read what they wrote
$vbulletin->input->clean_array_gpc('c', array(
    
COOKIE_PREFIX 'userstyleid'     => TYPE_INT,
    
COOKIE_PREFIX 'skipmobilestyle' => TYPE_BOOL,
));
$skip $vbulletin->GPC[COOKIE_PREFIX 'skipmobilestyle'];
//Admin can have any style they want, so check if they're an admin and have specificed a styleid
if ($vbulletin->userinfo['permissions']['adminpermissions'])
{
$vbulletin->input->clean_gpc('r''styleid'TYPE_INT);
$styleid $vbulletin->GPC['styleid'];
}
else if (
$skip)
//if the user is not an admin has chosen to skip the mobile style (if allowed) give them default
$styleid=$vbulletin->GPC[COOKIE_PREFIX 'userstyleid'];
else if (
$vbulletin->mobile_browser_advanced
$styleid=89;  //Advanced mobile style ID
else if ($vbulletin->mobile_browser)
$styleid=89;   //Basic mobile style ID
else 
$styleid=1;  //everyone else gets default style default style

select:eval
//options = fetch_style_title_options_array('', false, 'mobile');
$options fetch_style_title_options_array();
$options = array('0' => $vbphrase['none']) + $options

?

Thanks for your prompt response

dartho 03-27-2013 04:10 AM

No - you would need to put your site into debug mode, then go into your vbulletin options in AdminCP where you choose the style settings and click on the edit link next to where you select the mobile styles and change the Option Code in there

Filgga 03-27-2013 04:25 AM

Quote:

Originally Posted by dartho (Post 2412498)
No - you would need to put your site into debug mode, then go into your vbulletin options in AdminCP where you choose the style settings and click on the edit link next to where you select the mobile styles and change the Option Code in there

Gotcha!

Will revert to you once successful. Obrigado!

----Edit----

I worked. Thanks much!

Shaybloom 03-29-2013 10:28 AM

How do i change the blue colour thats all over including the footer to black??
I tried changing footer colour and border almost everything in footer IN Style Variable Editor
to black and saved it it even shows red colour indicating it is edited but strangely enough NOTHING has changed on the theme on the forum,its still BLUE
please help!

tareqbd 03-29-2013 12:43 PM

Quote:

Originally Posted by dartho (Post 2409603)
edit the SHOWTHREAD template,
search for (near the bottom of the template)
Code:

{vb:raw footer}
and add the following immediately above it

Code:

{vb:raw template_hook.showthread_below_posts}

OK, I have tried already but no luck. Still the charged content not loading on click.
Any other suggestion please.

dartho 03-29-2013 01:03 PM

Quote:

Originally Posted by Shaybloom (Post 2412903)
How do i change the blue colour thats all over including the footer to black??
I tried changing footer colour and border almost everything in footer IN Style Variable Editor
to black and saved it it even shows red colour indicating it is edited but strangely enough NOTHING has changed on the theme on the forum,its still BLUE
please help!

see the 5th dot point of the install instructions

dartho 03-29-2013 01:04 PM

Quote:

Originally Posted by tareqbd (Post 2412913)
OK, I have tried already but no luck. Still the charged content not loading on click.
Any other suggestion please.

I don;t use that add-on. Have you asked them what requirements are?

tareqbd 03-29-2013 07:09 PM

Quote:

Originally Posted by dartho (Post 2412917)
I don;t use that add-on. Have you asked them what requirements are?

Yes, I did. Their reply was as below:
Quote:

Quote Originally Posted by Belazor View Post
showthread_below_posts is needed for the JS code that powers charged content.

dartho 03-30-2013 03:17 AM

So they told you the same thing again? Did you let them know that adding that hook didn't appear to work for you? If not, you may want to do so.


All times are GMT. The time now is 06: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.03475 seconds
  • Memory Usage 1,895KB
  • 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
  • (11)bbcode_code_printable
  • (4)bbcode_php_printable
  • (22)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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