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)

FerScrich 12-02-2011 01:47 PM

Hi:
I have installed it on a vb4.1.8 and when i write a message i don't see the smilies and the CKEditor, is there any possibility to get it?

Thanks in advance.

dartho 12-02-2011 10:09 PM

You could try reverting all the templates in teh editor group, but YOu'll have more tweaking to do also. I have deliberately removed it and there are likely javascript files which need to be included in the header as well, so to implement it won't be strainght forward

thenamesgould 12-03-2011 09:27 PM

Quote:

Originally Posted by dartho (Post 2272091)
But it did not have this problem before making those chnages? If this is the case, try reverting the editor_clientscript template. For what its worth, I've never been able to reproduce the errant "<br />" problem, so I think it's a combination of factors causing it - makes it hard to pin down

Are you still looking at this one dartho? I tried changing it back to how it was because those <br />'s were appearing in people's posts and annoying me, but I must have done something wrong because now two text boxes are appearing! haha.

But I am happy to give you any more details if you need them. :)

dartho 12-03-2011 10:00 PM

I can't reproduce it - do you have a test site where it also happens I could get access to?

thenamesgould 12-04-2011 01:27 AM

Quote:

Originally Posted by dartho (Post 2274415)
I can't reproduce it - do you have a test site where it also happens I could get access to?

Well I have my site that I'm happy to give you access to, to have a look at what might be causing it.

tafreeh 12-04-2011 05:12 AM

Quote:

Originally Posted by tafreeh (Post 2272616)
Is there any way to prevent showing thread content text format ? ?

coz, in my forum ppl likes to use different color and bigger text that does not really looks good on this theme.. Is there any way not to show txt format and just to show simple text... ??

sorry forgot to maked install :)

Bacon Butty 12-05-2011 07:22 PM

Firstly, awesome style. I've been utilising it for some time.

Since upgrading recently, my users have become "trapped" in the mobile skin, unable to revert back to PC Mode.

The Default Style for Modern Mobile Browsers is unable to be changed, despite having Allow Users To Change Styles to YES.

Any ideas?

Also a tad confused as to what takes precedent with default styles settings between Style and Language Settings and Lightweight Style Options - both include choices to set as defaults?

dartho 12-05-2011 09:59 PM

Lightweight STyle Options asks those for creating links to default style and so it knows what the style ID of teh lightweight style is when it comes to doing things like disabling add-ons etc - it doesn't use these for detection - these won;t affect vBulletins detection. Did you have any other detection scrips before upgrading?

Bacon Butty 12-06-2011 06:37 PM

Quote:

Originally Posted by dartho (Post 2275007)
Lightweight STyle Options asks those for creating links to default style and so it knows what the style ID of teh lightweight style is when it comes to doing things like disabling add-ons etc - it doesn't use these for detection - these won;t affect vBulletins detection. Did you have any other detection scrips before upgrading?

Thanks for attempting to fix my problem - sure is appreciated.

I only have a couple of basic add-ons (VSa - Advanced Permissions Based on Post Count, Word Links by BOP5 VB4, vBookie, vB Optimise Lite, Separate Sticky and Normal Threads, Notification for Reputation) - no detection scripts.

If you have a moment, the website is www.grandoldteam.com/forum. If you visit via a mobile, you'll find your unable to escape the default mobile skin on any page other than forum home. Absolutely no idea where to look to fix, .htaccess?

TinCow1 12-06-2011 06:44 PM

Quote:

Originally Posted by thenamesgould (Post 2274409)
Are you still looking at this one dartho? I tried changing it back to how it was because those <br />'s were appearing in people's posts and annoying me, but I must have done something wrong because now two text boxes are appearing! haha.

But I am happy to give you any more details if you need them. :)

I get this exact same problem: the posted fix results in the <br /> issues, and reverting it causes the double text box in addition to the vertical smilies.

etca 12-06-2011 07:00 PM

Quote:

Originally Posted by dartho (Post 2271597)
Replace the contents of the pm_messagelistbit template with
Code:

<div class="thread_<vb:if condition="$show['unread']">
new</vb:if>"><img src="{vb:stylevar imgdir_statusicon}/pm_{vb:raw pm.statusicon}.png" class="threadicon" alt="" /> <a href="private.php?{vb:raw session.sessionurl}do=showpm&amp;pmid={vb:raw pm.pmid}" class="title">{vb:raw pm.title}</a>

        </div>
<div class="windowbg" id="pm_{vb:raw pm.pmid}">
                <vb:each from="userbit" value="row">
                        <a href="{vb:link member|js, {vb:raw row}}" class="username understate">{vb:raw row.username}</a>{vb:raw row.comma}
                </vb:each>
        : {vb:raw pm.senddate},&nbsp;<span class="time">{vb:raw pm.sendtime}</span>
</div>


thx u. it's works on me.

etca 12-06-2011 07:06 PM

dartho,
how to fix this?

https://vborg.vbsupport.ru/external/2011/12/53.jpg



Quote:

Originally Posted by semprot (Post 2269777)
It works with 4.1.8. However here is how to show Reputation, Infraction, and Report message link.

Put this before last </div> to your postbit template (if you are using non-legacy), or postbit_legacy template (if you are using post legacy)

PHP Code:

<vb:if condition="$show['reputationlink']">
<
a id="btn" href="reputation.php?{vb:raw session.sessionurl}do=addreputation&amp;p={vb:raw post.postid}" rel="nofollow">Reputation</a>
</
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']">
<
a id="btn" href="infraction.php?{vb:raw session.sessionurl}do=report&amp;p={vb:raw post.postid}" rel="nofollow">Infraction</a> &nbsp;
</
vb:if> 


kok ga ngefek?
*it doesn't work

dartho 12-06-2011 09:25 PM

Quote:

Originally Posted by thenamesgould (Post 2274409)
Are you still looking at this one dartho? I tried changing it back to how it was because those <br />'s were appearing in people's posts and annoying me, but I must have done something wrong because now two text boxes are appearing! haha.

But I am happy to give you any more details if you need them. :)



thenamesgould worked out how to reproduce this - it only happens when the user uses full WYSIWIG editor (as set in UserCP).

Found a template only way to resolve:

Edit the editor_ckeditor temaplte and replace contenst with:
HTML Code:

<div id="{vb:raw editorid}">
{vb:raw ckeditor}
</div>

<input type="hidden" name="wysiwyg" id="{vb:raw editorid}_mode" value="{vb:raw editortype}" />

Edit the lightweight.css.php file, search for:
Code:

body
{

and add immediately above:
Code:

.hidden {display:none;}
That should do it.

The following superceded by above, but kept here for reference


[s]
A quick fix is to add a plugin as follows:
Title: Lightweight Style - Set Editor Mode to Standard (bugfix)
Hook: style_fetch (there could be a better place, but this works)
Order: 5
Code:
PHP Code:

// Fixes bug were <br /> shows up in posts when user has Full WYSIWIG editor by overriding to text box only
$vbulletin->userinfo[showvbcode]=0

If you have Lightweioght Style Options installed, you could add the code to the "Enter code here to disable addons" section of that rather than create a new plugin.

There is probably another way, and I'll look into it - but for those that want a fix now, tis is it.[/s]

dartho 12-06-2011 09:39 PM

Quote:

Originally Posted by etca (Post 2275259)

Edit the tagbit_wrapper template and replace it's contents with:

HTML Code:

<vb:if condition="$tag_list">
                <vb:each from="tag_list" value="row">
                        <a href="tags.php?{vb:raw session.sessionurl}tag={vb:raw row.url}">{vb:raw row.tag}</a>{vb:raw row.comma}
                </vb:each>
<vb:else /><i>{vb:rawphrase none}</i></vb:if>


dartho 12-06-2011 09:56 PM

See 2 posts up for template only way to reolve errant <br />'s turning up when quoting - I just edited the post, no plugin required

etca 12-07-2011 12:04 AM

Quote:

Originally Posted by dartho (Post 2275323)
Edit the tagbit_wrapper template and replace it's contents with:

HTML Code:

<vb:if condition="$tag_list">
                <vb:each from="tag_list" value="row">
                        <a href="tags.php?{vb:raw session.sessionurl}tag={vb:raw row.url}">{vb:raw row.tag}</a>{vb:raw row.comma}
                </vb:each>
<vb:else /><i>{vb:rawphrase none}</i></vb:if>


Hooo thanks dartho..
it's works on me

tafreeh 12-07-2011 05:20 AM

Quote:

Originally Posted by tafreeh (Post 2274494)
sorry forgot to maked install :)

@dartho: you missed me again.. :(

thenamesgould 12-07-2011 06:17 AM

Thanks again, dartho. :)

dartho 12-07-2011 11:08 AM

Quote:

Originally Posted by tafreeh (Post 2275431)
@dartho: you missed me again.. :(



I haven;t forgotten you - it's just that I've been fixing style bugs - your request is not related to this style as such.

Having said all that - I'll try and point you in the right direction -

To strip all HTML tags from posts for a specific style ID, create a plugin as follows:

Product:vBulletin
Hook Location: Postbit Disaply Complete
Name: Strip HTML from Mobile Style Posts
Execution Order:5
Code:
Code:

if (STYLEID=='n') {
$post['message']=strip_tags($post['message'],'<br><a>');
}

replace 'n' with teh styleid of your lightweight style.

the bit in teh code with teh <br><a> is HTML tags you wish to allow, if you want images, add in <img>, if you want <stong> add it in etc. Google php strip_tags

mvoelker 12-08-2011 12:32 AM

Just want to chime in and say thanks for this. All my users prefer this significantly over the built in mobile style.

tafreeh 12-08-2011 03:51 AM

Quote:

Originally Posted by dartho (Post 2275506)
I haven;t forgotten you - it's just that I've been fixing style bugs - your request is not related to this style as such.

Having said all that - I'll try and point you in the right direction -

To strip all HTML tags from posts for a specific style ID, create a plugin as follows:

Product:vBulletin
Hook Location: Postbit Disaply Complete
Name: Strip HTML from Mobile Style Posts
Execution Order:5
Code:
Code:

if (STYLEID=='n') {
$post['message']=strip_tags($post['message'],'<br><a>');
}

replace 'n' with teh styleid of your lightweight style.

the bit in teh code with teh <br><a> is HTML tags you wish to allow, if you want images, add in <img>, if you want <stong> add it in etc. Google php strip_tags

thanks allot for this :)

inphoenix 12-08-2011 05:24 AM

I see this question was asked but not sure if it was answered. Can I add admob banners to this style? If yes, how? Thanks.

dartho 12-08-2011 06:41 AM

if you can add to standard style, you can ad to this I guess. I don't know what admob is

inphoenix 12-08-2011 12:08 PM

Quote:

Originally Posted by dartho (Post 2275804)
if you can add to standard style, you can ad to this I guess. I don't know what admob is

Admob is banner ad serving program for mobile devices. It generates a Google adsense like script to use. Where would I add that script if I want to post the banner after

1. First post.
2. Last post.

Thanks for your prompt response.

dartho 12-08-2011 12:53 PM

I don't do advertising inposts or threads etc, so have no idea. I'm pretty sure the ad hooks are in this style, so you would use them the same way you would with the default style. Find where someone else has done this with the default style and do the same as them.

inphoenix 12-09-2011 04:28 PM

Quote:

Originally Posted by dartho (Post 2275875)
I don't do advertising inposts or threads etc, so have no idea. I'm pretty sure the ad hooks are in this style, so you would use them the same way you would with the default style. Find where someone else has done this with the default style and do the same as them.

Thanks for a quick response. I found out that admob does not work for mobile apps but I got the code for Mobile Adsense. Those links are javascript. I tried using it in a regular HTML page on phone and it works but using it in the ad_showthread_firstpost_start does not work. If I use an adsense link in this ad_showthread_firstpost_start on regular desktop style it works.

Do you know if the lighweight (mobile) style will support javascript?

Has anyone else done this?

dartho 12-09-2011 09:28 PM

I just had a look, and those template hooks aren;t there. Try editing the postbit and postbit legacy templates and adding the following code at the end of the template and see how that goes (try both to see how it looks)
Code:

        <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>


inphoenix 12-09-2011 10:59 PM

Quote:

Originally Posted by dartho (Post 2276388)
I just had a look, and those template hooks aren;t there. Try editing the postbit and postbit legacy templates and adding the following code at the end of the template and see how that goes (try both to see how it looks)

Code:

        <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>


Adding this in postbit legacy did it. Thank you so much !!

inphoenix 12-12-2011 02:49 AM

How do I add another banner at the end of thread? I tried adding it in ad_thread_last_post_content but it won't show up. Ideally something at the end of thread (after all posts) would be really nice. Thanks.

dartho 12-12-2011 04:40 AM

The only other ad hook location in threads is the first post sig. I think that if those ad hooks I asked you to add to the postbit template aren't doing it, your problem lays elsewhere. Alternatively there are header and footer hooks that can be added in.

inphoenix 12-12-2011 05:28 AM

Quote:

Originally Posted by dartho (Post 2276968)
The only other ad hook location in threads is the first post sig. I think that if those ad hooks I asked you to add to the postbit template aren't doing it, your problem lays elsewhere. Alternatively there are header and footer hooks that can be added in.

The banner at start of first post is working fine. I want to add another one at the end of thread.

Please tell me how to add footer hook.

S_E_A 12-12-2011 10:11 AM

Hello Dartho,

I'm having a problem with resizing images. I tried the suggested method in post #333, but unfortunately it did not resolve the problem.

Is there another method I can try? I'd prefer the images to be resized rather than have them as a link.

Thank you.

dartho 12-12-2011 09:28 PM

@SEA - you could try editin the CSS file and adding the following [s]before teh ?>[/s] at the end of the file

Code:

img {
max-width: 200px;
}

@inphoenix - the ad_footer_start and global_above_footer ad hooks are already there. Perhaps your ad provider or ad script is only alklowing a single ad at a time? Try disabling other locations to see if they show up

inphoenix 12-12-2011 10:39 PM

Quote:

Originally Posted by dartho (Post 2277147)
@inphoenix - the ad_footer_start and global_above_footer ad hooks are already there. Perhaps your ad provider or ad script is only alklowing a single ad at a time? Try disabling other locations to see if they show up

Thanks. Adding it to ad_footer_start worked.

S_E_A 12-13-2011 08:39 AM

Quote:

Originally Posted by dartho (Post 2277147)
@SEA - you could try editin the CSS file and adding the following before teh ?> at the end of the file

Code:

img {
max-width: 200px;
}


Sorry, where exactly should I place the above, dartho?

dartho 12-13-2011 09:15 AM

sorry, edit the CSS file (the lightweight.css.php file you uploaded to your server), and add it right at the end - sorry, no ?> to search for at the end.

S_E_A 12-13-2011 10:52 AM

No joy unfortunately, mate.

Images are resizing when I switch to the lightweight style on desktop, but not on mobile device.

dartho 12-13-2011 11:48 AM

Quote:

Originally Posted by S_E_A (Post 2277298)
No joy unfortunately, mate.

Images are resizing when I switch to the lightweight style on desktop, but not on mobile device.

what device - perhaps there just isn't the support in that mobile browser, in which case there is little you can do ...

actually - try deleting your cache etc and see if that helps...

S_E_A 12-13-2011 01:05 PM

Tut... Worked a treat. Cheers mate ;)

Hippy 12-14-2011 01:09 AM

great style.. 2 thumbs up
been reading it all here to apply all the fixes posted ..
thanks to everyone that posted a fix..

one thing tho I didn't find here is when you click on User CP
it is always showing
New Private Messages : (1)
even with none ... or if you have 3 it shows 4

weird

anyone with a fix for this would be greatly appreciated


All times are GMT. The time now is 06: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.05522 seconds
  • Memory Usage 1,870KB
  • 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
  • (9)bbcode_code_printable
  • (3)bbcode_html_printable
  • (2)bbcode_php_printable
  • (20)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)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