PDA

View Full Version : Mobile, Cell, Phone, PDA, iPhone Style


Pages : [1] 2 3 4

dartho
28 Mar 2008, 02:24
vBulletin 4.0 version here: http://www.vbulletin.org/forum/showthread.php?t=228986

A very cut back style with very low bandwidth usage which renders well on pretty much all small screen devices from old Nokias to new iPhones.


Supports viewing/posting/replying in forums
Supports Private Messaging
Supports Tags (viewing, not adding)
Supports viewing and replying to messages in Social Groups
Supports Thread Prefixes
has an add-on product to customise here: Extend and Customise Mobile Style (It is recommended that you install this also, but not required)
Supports other stuff too ....


Notes

If you are installing this on a vBulletin version higher than the current 'supported' version, and wish to get rid of the Out-of-Date Custom Templates Found! errors, see Post #329 (http://www.vbulletin.org/forum/showthread.php?p=1607905#post1607905) for more information...
I suggest you also install this add-on to this style to get more out of it...
To modify the colour scheme of this style, you have to edit the wireless.css file by hand
If you use a portal such as vbadvanced which you wish to disable in mobile style, see here (http://www.vbulletin.org/forum/showthread.php?p=1535871#post1535871)


Release Information

Version 0.0.1 - Initial release ported from my 3.6 version here
Version 0.0.2 - Added auto quoting when replying to a post
- fixed "Up" link bug
- Added 'Posted via Mobile Device' message to new posts
- couple small non - critical bugs fixed in some links
Version 0.0.3 - No change other than change version to 3.7RC2
Version 0.0.4 - Updated with security tokens tages for forms submital, and Gold version
Version 0.0.5 - fixed navbar template "Home" link (you will need to edit this if your default forum page is not index.php)
Version 0.0.6 - added ad_hook locations, fixed page titles, fixed couple small bugs
Version 0.0.7 - Added Style chooser to UserCP, Post count to threads, Search Page, Attachment Sizes, More detailed time info, viewing/voting in polls, other stuff too probably :)
Version 0.0.8 - now has an addon to customise certains aspects of this style - see HERE (http://www.vbulletin.org/forum/showthread.php?t=182692)
Version 0.0.9 - updated template version numbers to to 3.7.2 - no other changes have been made
Version 0.0.10 - Now Fully Phrased (thanks Keyser Soze) Other updates included so its add-on product can do more customization
Both this style and the addon will have the same version numbers - it's best to make sure you update the add-on when updating the style.
Version 0.0.10a - fixed small bug in footer template


Install Instructions

Save attached XML to your local computer
Save attached wireless.css.txt, rename to wireless.css and upload to your forum root
In AdminCP go to "Styles and Templates"
In the "Import Style XML File" section browse to where you saved the XML
Click "Import" button
Come back to this page and click "Mark as Installed"

Other useful Add-ons to use in Conjunction with this style

Extend and Customise Mobile Style
This is a companion add-on designed specifically for this style which allows you to customise some aspects of it without the need to edit templates. Only works with version 0.0.8 and above
Mobile Phone / iPhone / PDA Detection and Style AssignmentWill automatically detect a mobile device and force the user to use a pre-defined style
Different Domain, Different Style
Will force the user to a predefined style based on URL visited (eg. visiting mobile.yourdomain.com will force the user to use a pre-defined mobile style wilst www.yourdomain.com will display your defaultstyle to the user

Limit Posts/Thread per Page for a Specific Style
Will set the maximum number of posts and threads displayed on a page based on a style. Whilst you may want to display 25 threads per page on a desktop, a small screen/mobile device would probably benefit from only showing 5 - 10 threads per page.

How to hide a style from style chooser
This template edit will allow you to 'hide' a style from the Style Chooser so users can't select a specified style.

Other Mobile Styles worth checking out

ElForro's (http://www.vbulletin.org/forum/member.php?u=132539) iPhone / iPod Touch Optimized Style (http://www.vbulletin.org/forum/showthread.php?t=171947)
Zachery's (http://www.vbulletin.org/forum/member.php?u=18025) vB Lite Style (http://www.vbulletin.org/forum/showthread.php?t=92071)
vBMechanics Mobile Alabama Style (http://www.vbulletin.com/forum/showthread.php?p=1085230#post1085230)

Jase2
28 Mar 2008, 02:33
Dartho, thank you very much! I'll get this installed, then let my members report any bugs ect.

Thanks, once again!

Regards Jason :)

Jase2
28 Mar 2008, 02:57
2. Different Domain, Different Style (3.7 should be released today)
Will force the user to a predefined style based on URL visited (eg. visiting mobile.yourdomain.com will force the user to use a pre-defined mobile style wilst www.yourdomain.com will display your default style to the user

Dartho,

Does this mean we can choose our own domain for users to visit on their handheld device? If so, that would be great!

Regards Jason :)

M-Tuning
28 Mar 2008, 14:56
Dartho,

Does this mean we can choose our own domain for users to visit on their handheld device? If so, that would be great!

Regards Jason :)

Yes, it's this mod: http://www.vbulletin.org/forum/showthread.php?threadid=174381

diola
29 Mar 2008, 21:07
Hey guys, just a little question here, i have this style running fine, plus the mobile detection, but i need to put the style options in the forum home, because some of my users are using it as default style and some-times need to come back to the graphic style. Some one can help-me on it? That can be done with 2 solutions, i just dont know how to do this:

1- Enabling quick style chose on forum home (in mobile style it is off)
2- Removing the mobile style from the users selection menus (but keeping this running)

MrToasty
30 Mar 2008, 09:30
Nice :)

dartho
30 Mar 2008, 12:47
Updated with thanks to Mr Toasty and Ryan Beal for pointing so bugs that kept slipping through the net...

Added Screenshots

Version 0.0.2
- Added auto quoting when replying to a post
- fixed "Up" link bug
- Added 'Posted via Mobile Device' message to new posts
- couple small non - critical bugs fixed in some links
- Still to do - Phrase everything :erm:

timefactor
30 Mar 2008, 14:04
nice one, thanks.

SuperJETT
30 Mar 2008, 14:19
Love it, even better than the previous versions. Thanks.

dartho
31 Mar 2008, 01:55
You're welcome

slmoney
31 Mar 2008, 14:11
Thank you for addressing the "posted by mobile" this rocks!

SuperJETT
01 Apr 2008, 15:12
Some feedback during my April Fool's joke using this style:
The quick reply box isn't obvious to most people, so they are clicking Post Reply and since the Posted via Mobile Device is there, it will post and their post is empty.

This is based on hardly any of my users seeing this theme before, so they think they're going to the full editor instead of doing a quick reply.

I do like the changes you've made, very clean/usable IMO.


BTW, if anyone wants to see, here's my April Fool's joke with this theme: http://www.x-h2o.com/showthread.php?t=33726 Some of the comments are LOL

Jase2
01 Apr 2008, 16:02
Hi Dartho,

When installing a new version, I just merge it into the old 'mobile' style. Is this correct?

Upgrade to RC2 -- and as usual it says you need to revert templates for style 'mobile'. Is there anyway to dismiss these? I've edited it and changed the version number to RC2.

Regards Jason :)

dartho
01 Apr 2008, 23:23
That should be OK, Jase2 - and may revert templates also? I usually install fresh and then delete the old version..

Jase2
01 Apr 2008, 23:48
Yes, it's asking to revert the templates. Shall I revert for 'mobile'?

Regards Jason :)

dartho
02 Apr 2008, 00:13
Yes, I think so...

BTW - I edited the XML and updated version numbers to RC2

mac27
02 Apr 2008, 01:45
Hey clicked install. It seems to be working great so far. I will let you know if I run into any problems with it. Thanks a million for this.

Jase2
03 Apr 2008, 13:53
Hello Dartho,

Can you add google ads for mobiles to this style? I'm trying to add them, and I get the following error (tried a few templates):

The following error occurred when attempting to evaluate this template:

Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/user/public_html/forum/includes/adminfunctions_template.php(3708) : eval()'d code on line 39

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.

Any ideas?

dartho
03 Apr 2008, 22:50
Got any links?

Jase2
04 Apr 2008, 18:16
Its in Google Adsense. AdSense for Mobile Content

dartho
05 Apr 2008, 00:59
Adsense for Mobile is PHP code - it can;t be just added to a style with template edits. Where would you want the ads to appear?

Jase2
05 Apr 2008, 12:03
Ah, I see. Where is the most suitable place to have them showing? If you can suggest one, then that'd be great! :)

Chris-777
05 Apr 2008, 18:42
Sorry if this has been asked, but what are you using to test it on? (The app in the screenshots)

dartho
05 Apr 2008, 22:29
Sorry if this has been asked, but what are you using to test it on? (The app in the screenshots)
Microsoft's windows mobile emulator

slmoney
05 Apr 2008, 22:37
Ads...

If they could be added in places like..below the navbar...after 1st post...and at the footer...I'd be a happy camper!

dartho
05 Apr 2008, 23:50
I'm going to have to put some template hooks in - I could re-insert the default ones, but then you'd get the same ads on mobile as desktop.

I'll try and put them in the same locations as the current ad hooks but preface teh name with "mob_"

A new version will be out with these in sometime this week

Jase2
06 Apr 2008, 13:13
Thanks Dartho!

MissKalunji
08 Apr 2008, 05:11
it's a nice style but to me was hard on the iphone :-/ i have a hard time to read and i've tested it with the website you gave in the previous thread and it said :

dancehallareaz.com/forum
It will possibly display poorly on a mobile phone.


Failed
XHTML Mobile Profile
Valid Markup
Character encoding

Warning
Use of stylesheets
Access keys
Default input mode

dartho
08 Apr 2008, 06:30
it's a nice style but to me was hard on the iphone :-/ i have a hard time to read and i've tested it with the website you gave in the previous thread and it said :

dancehallareaz.com/forum
It will possibly display poorly on a mobile phone.

ready.mobi is a test for "mobi" sites using their own set of criteria.

I'm limited to markup and character encoding as used by vBulletin which was never really designed with mobile devices in mind. However, this style does display on pretty much any device and gives quite significant functionality and very low bandwidth requirements.

I have listed a few other "mobile device" styles which are worth a look also.

One day I may take a stream off this one and make a "prettier" version for newer devices, but that will come at a sacrifice of bandwith and compatibility with older/smaller screen devices.

MissKalunji
08 Apr 2008, 06:39
thank's for clearing this up :) it looks fine really it was just hard on my eyes at first lol. And wasn't loading as fast as the previous one but like you said sacrifice for more features. and it wasn't that slow either. a lot of my members said they preferred that

i was just pointing it out in case you didn't know

Thanks for releasing this. I ended up using it anyways :)

MissKalunji
08 Apr 2008, 15:03
Tiny problem in certain modification (like Gars and first thread post) the quick reply doesn't show...how can i fix that?

dartho
08 Apr 2008, 15:40
doesn't work too well with GARS does it (I also use GARS) :(

It seems that my hiding images doesn't work with GARS too well. You can either edit the GARS templates for the mobile style and replace buttons with text links, or I think if you remove the following replacement variables from the Style Options for this style:

border="0" alt="" />
class="inlineimg" />
img src


that may fix it. However, this will also have the effect of dispalying images/smilies inline in teh mobile style rather than just linking to them

I only developed this under an unmodified vBulletin so issues like this may appear from some addons. It may be possible to not have GARS apply to forums when when using the mobnile style? Should I look at this option further?

MissKalunji
08 Apr 2008, 22:27
yeah not showing gars in style would be a lot easier i believe...

Thanks!

MissKalunji
09 Apr 2008, 00:19
actually it doesn't show up in any of the postbit for any

i'm on 3.7.0 rc 2 some threads have the quick reply others doesnt

MissKalunji
09 Apr 2008, 00:46
view here : http://www.dancehallareaz.com/forum/laugh-til-yuh-drop/26236-beenie-vs-bounty.html

and view there

http://www.dancehallareaz.com/forum/dancehall-board/25672-myspace-war-ova-movado-2.html

i have to use the standards $message area one

Jenkins
10 Apr 2008, 18:40
nice... will be installing this soon.

dartho
11 Apr 2008, 03:45
@MissKalunji - not sure what the issue may be there...

On a note to disabling GARS for a specific style, Morgan over at www.TheVBGeek.com offered this suggestion which I tested and it seems to work:

Edit the "GARS - Startup" plugin and replace


require_once(DIR . '/geek/gars/includes/gars_ignition.php');


with


if (STYLEID != xx){
require_once(DIR . '/geek/gars/includes/gars_ignition.php');
}


where xx = the styleid of the mobile style.

MissKalunji
11 Apr 2008, 15:39
ah ok thanks :)

Jase2
14 Apr 2008, 18:08
Can we expect a new version shortly, Dartho? :p

rob30UK
17 Apr 2008, 13:33
Hey dartho....

Having two issues...

Firstly, not getting the 'posted by mobile device' when i post from a mobile device.

Second, when i login using the form at the bottom of the homepage, it logs in fine, but am redirected to login.php which comes up blank. i can then manually visit the homepage and everywhere else and i AM logged in... just seems the redirection page after logging in isnt set up properly. Is anyone else finding this?

rob30UK
17 Apr 2008, 13:34
after investigation, this may only happen when there has been at least one failed login attempts

J105C
21 Apr 2008, 08:12
'Posted via Mobile Device' message to new posts does not work!

I just tested posting a thread and it didnt' come up weird :o

vB 3.6.9 here though

slmoney
23 Apr 2008, 20:27
any luck configuring Adsense with this?

slmoney
23 Apr 2008, 20:37
'Posted via Mobile Device' message to new posts does not work!

I just tested posting a thread and it didnt' come up weird :o

vB 3.6.9 here though

actually...it works of you hit Post reply...but does NOT work if you use quick reply....

MissKalunji
23 Apr 2008, 20:51
it works both ways for mine:-/

buro9
24 Apr 2008, 16:58
I want to install this but would like to know if it is affected by the security vulnerability discovered in the latest version of vBulletin and whether it works with 3.7 RC4 or will require re-visiting before it is ready for 3.7.

Just to re-cap... all of the forms require changes.

Jase2
27 Apr 2008, 00:13
I hope there's an update soon.... :)

I'm sure Dartho will be back soon.

Crimm
29 Apr 2008, 15:37
Dartho I hope you don't mind this. I HAD to get this working, so I thought I would offer everyone a bandaid until Dartho gets back. I thought I would share in case anyone is stuck after moving to 3.7 today.

Okay I had to get this working, since I have already moved to 3.7 and I have mobile users ;)

According to this post: http://www.vbulletin.org/forum/showthread.php?t=177013

If you are getting this error:

‪Your submission could not be processed because a security token was missing or mismatched.If this occurred unexpectedly, please inform the administrator and describe the action you performed before you received this error Find the following templates:


SHOWTHREAD
newthread
newreply
showthread_quickreply
modifysignature
modifyoptions
socialgroups_group
pm_newpm
editpost
Add this just before the submit button:
<input type="hidden" name="securitytoken" value="$bbuserinfo[securitytoken]" />That should at least get you by in a pinch until Dartho puts a new version up.

;)

dartho
30 Apr 2008, 08:28
Many thanks, Crimm - I've been away for a few weeks and only got back this morning. I'll look into this soon when I get a chance!

Crimm
30 Apr 2008, 16:06
Many thanks, Crimm - I've been away for a few weeks and only got back this morning. I'll look into this soon when I get a chance!

NP. I love your theme btw ;)

EDIT: I may have found a bug. I can't tell if it's my phone, my server or my site, but sometime the pages load blank.

lifanovsky
01 May 2008, 01:49
Since gold is here - will this theme be updated? Thanks in advance - looking forward, actually...

swissbob
03 May 2008, 16:49
Any solution to the Mobile Adsense issue?

And we really need some way for users to switch the style back to the default at least - people are getting locked into the mobile style if they select it from the drop down menu :) :(

Great style though, thanks!

swissbob
03 May 2008, 18:29
I have set up a subdomain of my forum, m.myforum.com, using the Different Domain plugin, and given it this style.

I have turned off the 'include domain in URLs' option in vbSEO.

The front page works fine, and all the URLs now stay on the mobile domain. However, once I click on a forum page, all the links are now pointing back to the original domain. I tracked this down to the HTML head section, which includes:
<base href="http://www.myforum.com" />

I looked in the header and headinclude template and this isn't there.... so where does this come from and how do I remove it please?

TsirhCitna
03 May 2008, 21:26
This seems great except that you can't get out of the style once you choose it.

callumbush
04 May 2008, 20:33
This seems great except that you can't get out of the style once you choose it.

Yes I just logged on to say this also! :) I had to uninstall it to solve the problem

callumbush
04 May 2008, 22:38
Here is some more feedback:

1. If I am viewing a thread with multiple attachments, this style doesn't work great as it lists each attachment in one single line (i.e. it doesn't indent them), which makes the page extremely wide and therefore you have to zoom to view it (I was using Opera mini btw). There is also no gap between the names of each attachment, which makes them even harder to read/distinguish.

2. You cannot see how big an attachment is. It is really important to know this

Hope this helps! :)

Callum

Crimm
06 May 2008, 22:42
Here's some things I have found. Dartho I hope you don't mind me offering suggestions. If you do, let me know.

1. Style Choosing issue:

I went to the following template: modifyoptions

Before:

<div>
<input type="hidden" name="securitytoken" value="$bbuserinfo[securitytoken]" />
<input type="submit" class="button" value="$vbphrase[save_changes]" accesskey="s" />
<input type="reset" class="button" value="$vbphrase[reset_fields]" accesskey="r" />
</div>I added the following code:

<if condition="$show['quickchooser']">
<div class="windowbg2">Style Chooser</div>
<span>
<select name="styleid" onchange="switch_id(this, 'style')">
<optgroup label="$vbphrase[quick_style_chooser]">
$quickchooserbits
</optgroup>
</select>
</td>
</if>
</span>
<br />2. Phrases Missing

I also noticed that in the same template: modifyoptions... The following phrases aren't showing up:

$vbphrase[show_my_reputation_level]
$vbphrase[pm_from_buddies_only]
So if you go to the

Admin CP->Language and Phrase Manager
Click add new phrase at the bottom
In varname put pm_from_buddies_only
In text put PM's from buddies only
Add another new phrase
in varname put show_my_reputation_level
in text put Show my reputation level3. Larger Text in Some Areas

I have noticed that on some pages the text is larger than others, but I haven't figure out why. I'll play with it and see if I can find anything.

4. Spaces above and below SocialGroups and MemberINFO

For some reason on my phone there are newlines at the top and bottom of these templates. I don't see it when I use a PC browser. I'll also see if I can offer any advice on that as well.

Ad1tya
07 May 2008, 10:38
Can you please update this for vB 3.7 Gold?

lifanovsky
07 May 2008, 14:51
Can you please update this for vB 3.7 Gold?Just can't wait, really...

Jase2
07 May 2008, 19:44
Any update soon? :)

dartho
09 May 2008, 10:58
Sorry - no update coming anytime soon :(

Message from 'Update Email':

Many apologies but I no longer have the time to support this style. However, I hope not to leave everyone high and dry with an unsupported style - If anyone with necessary skills/knowledge is interested in taking over it's development etc, please let me know. All I ask in return is that they do the same should they no longer be able to develop in the future....

buro9
09 May 2008, 11:18
I still want this updated for vb3.7 but don't have the time to maintain all by myself.

However, if you're willing dartho, I am prepared to upload it to sourceforge under a open source license, and grant developer rights to other users so that the mobile skin can collaboratively be worked upon.

A definitive feature rich mobile skin is so essential, and this is the best of the bunch IMO. So I'd be happy to get it to 3.7 gold, get it open sourced and shared, and help deal with some of the bugs... providing that dartho agrees to open sourcing his code, and at least one other committed developer comes on board to help so that it's not a solo job.

dartho
09 May 2008, 11:36
Sounds fantastic to me if other coders/designers are up for it - a "stable release" should likely be maintained on vBulletin.org so people find it - but you already knew that ;)

Would vBulletin.org allow us to link to a sourceforge page ratherthan host the style here?

Crimm
09 May 2008, 13:59
I would like to take over the project if the offer still stands as well.

I'm semi-new to the vBulletin.org world, but I have enjoyed working on this style for my own site and wouldn't mind giving it a go here.

RCK
09 May 2008, 17:23
If Crimm already worked on this style, I would say let give it control.
This style deserve to be finalized for vB 3.7 :)

Jase2
09 May 2008, 18:59
That's a shame Dartho, but I understand how "real life" things can get in the way. I wish you the very best for the future.

When I get sometime, I'm going to be updating this for my tech site. I will then release an updated version.

MissKalunji
09 May 2008, 19:03
Sorry - no update coming anytime soon :(

Message from 'Update Email':

Thanks for your time :) nonetheless

RCK
09 May 2008, 21:36
I have set up a subdomain of my forum, m.myforum.com, using the Different Domain plugin, and given it this style.

I have turned off the 'include domain in URLs' option in vbSEO.

The front page works fine, and all the URLs now stay on the mobile domain. However, once I click on a forum page, all the links are now pointing back to the original domain. I tracked this down to the HTML head section, which includes:
<base href="http://www.myforum.com" />

I looked in the header and headinclude template and this isn't there.... so where does this come from and how do I remove it please?
Hello,
I don't know what is vbSEO and didn't change the 'include domain in URLs' option. But with standard vB I manage to fix the error you had.

Go into admincp > Search in Templates > Find and Replace > Choose "mobile" template.
Search for text: $vboptions[bburl]
Replace with Text: empty
Test Replacement: no
hit button "Find" and this will fix your problem, because all reference to original board url will have been removed :)

4695697.mobi
11 May 2008, 07:48
hi

I also would like to raise the question if anyone has found any success yet including Google's new "Mobile Adsense" yet with this wonderful mobile style (I get an error when I try to add the php codelet to the header or footer in Common Templates)

hope we can find out how soon, here, this is all Great :)

Thank you for this opportunity

Jase2
11 May 2008, 13:16
That's because it is PHP code. You will need to add some hook locations for mobile ads to work.

dartho
11 May 2008, 23:22
Crimm's changes to fix security token errors and RCK's changes to remove absolute URL's have now been implemented in latest version

SwollenCranium
12 May 2008, 02:36
I am unable to post.

When I attempt to make a post it says i am not logged in. Then it directs me to a log in page.

After I log in it tries to send me to the thread but instead gives me an 'invalid thread' message.


Any ideas what needs to be done to fix this ?

SAT2M
12 May 2008, 10:16
1. Mobile Phone / iPhone / PDA Detection and Style Assignment
Will automatically detect a mobile device and force the user to use a pre-defined style

This option dont work for me What I was doing?

dartho
12 May 2008, 11:46
@SAT2M - Not sure - but questions in regards to that add-on should probably be asked in its' thread.

@SwollenCranium - what sort of device are you posting from? Also - what are teh URL's which are giving you issues.

Crimm
12 May 2008, 18:19
Dartho,

Does this mean you have decided to work on it again? That's great news :)

I have more to add ... Keep posting in here?

TechGuy
13 May 2008, 02:24
My mobile version of Opera shows the 11x11progress image when I click inside the quick reply box... and then nothing else. :(

dartho
13 May 2008, 03:07
@Crimm - yeah, keep posting and I'll implement as I get the time
@TechGuy - so you can't type when in the Quick Reply box?

TechGuy
13 May 2008, 03:45
Right -- as soon as I click inside the message box it points my browser to the .gif image. It's not just showing the gif, but I can see the URL to the .gif in the address bar (rather than the URL of the thread I was viewing).

dartho
13 May 2008, 05:30
I actually don't use any gif's in this style - I logged onto your site with a mobile device and didn't get a mobile style either...

dartho
13 May 2008, 06:05
There seems to be a bug with the "Home" link in the navbar. You will need to edit the navbar template and edit the first line. It currently says

<div class="navbar"><a class="navbar" href="$session[sessionurl_q]">Home</a>


You will need to change it to

<div class="navbar"><a class="navbar" href="index.php$session[sessionurl_q]">Home</a>


or what ever your default forum home page is...

dartho
13 May 2008, 11:33
Change in previous post implemented. If you forum home page is not index.php - you will need to edit the navbar temaplte and change accordingly

tekguru
13 May 2008, 18:57
Good to see this being developed. Installed.

TechGuy
13 May 2008, 19:52
I actually don't use any gif's in this style - I logged onto your site with a mobile device and didn't get a mobile style either...

You're right -- you don't. It's got to be some WYSIWYG JavaScript. How else could it pick up when I click inside the textarea?

http://forums.techguy.org/ shows up in this skin on my phone in both IE and Opera... IE works completely OK, but Opera has the 11x11progress issue.

Thanks!

Jase2
13 May 2008, 20:18
Hi TechGuy, I don't seem to be having that problem with mine. Do you have any modified code ? I suggest you upload the code you're using, so that we can take a look. That is, the whole style .xml =)

TechGuy
13 May 2008, 21:37
I haven't modified the style in any way. Just signed up for your site (nice one, by the way) -- same problem when using Opera for Windows Mobile.

Jase2
13 May 2008, 21:47
Ah, so it appears to be. I'll have to take a look through the code -- unless Dartho already has a fix?

Just signed up for your site (nice one, by the way)

Thanks!

dartho
14 May 2008, 00:38
I just loaded opera mini 4 on my device, surfed to my site (which I just installed the latest version of this style on fresh).

The quick reply appears to have a small square in it which I am assuming is a carriage return or line feed marker.

By editing the SHOWTHREAD template and removing any whitespace between
"<textarea name="message" rows="10" cols="30" style="height:100px;width:100%" tabindex="1">"
and
"Posted via Mobile Device</textarea>"

this will remove that symbol. Although it doesn't appear to affect functionality...

TechGuy
14 May 2008, 00:59
Not Opera Mini, but Opera for Windows Mobile. :)

webghey
14 May 2008, 04:29
any help on the ability to allow tmobile sidekick users to see the normal version instead of mobile? I'm not sure what I would need to write in the exception box?

dartho
14 May 2008, 04:37
Assuming you are using this http://www.vbulletin.org/forum/showthread.php?t=173239 for mobile detection? If so, when a sidekick user is online, check their useragent string in teh Who's Online section. You can then pick a unique piece of this and add it to teh exceptions.

A quick google and it looks it the UA string will be: Mozilla/5.0 (compatible;AvantGo 3.2 ProxiNet; Danger hiptop 1.0)

If this is the case, probably add "hiptop 1.0" to the exceptions - I believe Danger Hiptop make the sidekick? Liek I said - this is from 30 seconds of research, so double check and test!

Hope this helps -

webghey
14 May 2008, 04:51
hey hey hey - thank u - I will look now

swissbob
14 May 2008, 18:24
Hello,
I don't know what is vbSEO and didn't change the 'include domain in URLs' option. But with standard vB I manage to fix the error you had.
http://www.vbseo.com

I have tried turning vBSEO off and on, and it is definitely the cause of the base href inclusion. I have asked on thieir forum if it is possible to turn it off.

In the mean time, I have been trying to install Google Mobile Adsense, without any luck. Do the hooks not work in this mobile style?

I tried a conditional clause on the style id in a new plugin like this, wrapped around the adsense code, but can't get it to appear for any of the main hooks:
if($GLOBALS[foruminfo][styleid]==8)
{
}
Admittedly my understanding and experience of the hook system is extremely limited.

Jase2
14 May 2008, 18:44
No, the template hooks will need to be added. I believe Dartho was going to do this, not too sure now, however. It's pretty easy to add the hooks, though. :)

TechGuy
14 May 2008, 18:55
FYI, I "fixed" the Opera Mobile bug by removing this code from the tagbit_wrapper template:

<img src="$stylevar[imgdir_misc]/11x11progress.gif" id="tag_form_progress" class="inlineimg" style="display:none" alt="" />

051119
14 May 2008, 20:46
Is it possible to turn off the 'Posted via Mobile Device' message?

Thanks!

joopster
14 May 2008, 21:02
Dartho I hope you don't mind this. I HAD to get this working, so I thought I would offer everyone a bandaid until Dartho gets back. I thought I would share in case anyone is stuck after moving to 3.7 today.

Okay I had to get this working, since I have already moved to 3.7 and I have mobile users ;)

According to this post: http://www.vbulletin.org/forum/showthread.php?t=177013

If you are getting this error:

Find the following templates:

Add this just before the submit button:
<input type="hidden" name="securitytoken" value="$bbuserinfo[securitytoken]" />That should at least get you by in a pinch until Dartho puts a new version up.

;)

Thanks for this but what is the submit button code?

Jase2
14 May 2008, 21:33
You don't need to do that now. Dartho has updated the original first post with the new download package :)

joopster
15 May 2008, 00:43
I am still getting that message. I have done the final update as suggested after going from 6.10 to 7 from vb.com. I don't know how to get this to work properly.

joopster
15 May 2008, 00:50
for some reason it works now.

oh well.

thanks!

dartho
15 May 2008, 01:35
No, the template hooks will need to be added. I believe Dartho was going to do this, not too sure now, however. It's pretty easy to add the hooks, though. :)

I did add these, and also managed to get Mobile Adsense working (with some manual work - no product for this sorry) but then trashed my dev server to do test runs on upgrading my live one... I'll look into it real soon and post an up date with the template ad hooks in and also soem guidelines on how to integrate mobile adsense...

dartho
15 May 2008, 01:37
Is it possible to turn off the 'Posted via Mobile Device' message?

Thanks!

Best way is to do a search and replace on the mobile templates - search for Posted via Mobile Device and replace with nothing...

I see I'm probably going to have to release a product with this style to turn things on and off and set options ?

swissbob
15 May 2008, 02:50
I did add these, and also managed to get Mobile Adsense working (with some manual work - no product for this sorry) but then trashed my dev server to do test runs on upgrading my live one... I'll look into it real soon and post an up date with the template ad hooks in and also soem guidelines on how to integrate mobile adsense...
That sounds great, thanks.

I finally managed to get a mobile sub domain working with vBSEO. for anyone else getting the same problem, there are at least two solutions here:
http://www.vbseo.com/f2/base-href-23196

swissbob
15 May 2008, 12:31
Our next challenge is to create a mobile domain site map for Google.

swissbob
15 May 2008, 12:45
Also, it is no longer validating as XHTML 1.0 Strict. It looks relatively simple to fix though - just remove a 'center' argument and the layout of some of the tags.

howarde
16 May 2008, 16:14
Great out of the box mobile style! Works great on my PDA!

I just added

<if condition="!$show['detailedtime']"><span class="time">$thread[lastposttime]</span></if>


to the Threadbit since our forum is very active - it makes it easier for someone like me (a user of the mobile style) :D

Jase2
19 May 2008, 23:51
FYI, I "fixed" the Opera Mobile bug by removing this code from the tagbit_wrapper template:

<img src="$stylevar[imgdir_misc]/11x11progress.gif" id="tag_form_progress" class="inlineimg" style="display:none" alt="" />

Thanks for that, TechGuy. That is however for the tags, so a work-around needs to be done. Saying that, Dartho hasn't made it work to add tags--so it must be there by mistake. I'm going to add capability for adding tags, so I'll post an update shortly. :)

swissbob
21 May 2008, 12:36
I have noticed that every page has the same title too. This is of course terrible for search engine placement.

The problem is that the headinclude features this:
<title>$vboptions[bbtitle] Mobile</title>
<link rel="stylesheet" href="wireless.css" type="text/css" />

I have been trying to use conditionals in the headinclude to change this. I can get it to work for the foumdisplay pages but not showthread:

<if condition="THIS_SCRIPT == 'forumdisplay'">
<title>$foruminfo[title_clean]<if condition="$pagenumber>1"> - <phrase 1="$pagenumber">$vbphrase[page_x]</phrase></if></title>
<else />
<if condition="THIS_SCRIPT == 'showthread'">
<title>$thread[prefix_plain_html] $thread[title]<if condition="$pagenumber>1"> - <phrase 1="$pagenumber">$vbphrase[page_x]</phrase></if></title>
<else />
<title>$vboptions[bbtitle] Mobile</title>
</if>
</if>
<link rel="stylesheet" href="wireless.css" type="text/css" />
I just get a blank title for the threads. I presume that this means that for some reason the $thread information isn't available? The page number will show, but the prefix and title are missing.

I am a complete novice at this kind of alteration. Can anyone see what I am doing wrong?

swissbob
21 May 2008, 13:07
This is just a quick recap of what this style could do with to make it perfect:

1. Mobile Adsense integration
2. Appropriate titles
3. An option to revert to the default style in the footer
4. Inclusion of tags for adding/editing (not essential though)
5. Optional removal of the 'posted via mobile device' message.
6. Creation of a mobile sitemap for Google

Jase2
21 May 2008, 14:26
Hmm.... why is is bad for search engine? Bots aren't going see this style, are they ?

It can be easily changed to use the forum and thread titles, but I don't see the benefits...

swissbob
21 May 2008, 15:40
Hmm.... why is is bad for search engine? Bots aren't going see this style, are they ?
They are if it is on a separate domain, which this style is designed for. Google runs a separate mobile search engine that will happily spider a mobile optimised version.

I use m.mydomain.com for the mobile version and hopefully I will work out how to create a separate mobile sitemap for the site too.

If it is easy enough, then please, please, please make the change! :)

Jase2
21 May 2008, 19:06
I see what you mean. I don't think this style was made for a different domain, though -- since Dartho only released an hack to do that not so long ago. It's simply an easy-to-use mobile style!

swissbob
21 May 2008, 21:24
I see what you mean. I don't think this style was made for a different domain, though -- since Dartho only released an hack to do that not so long ago. It's simply an easy-to-use mobile style!
Well, it's a match made in heaven. :)

I think that the titles should be fixed for both the sake of doing it properly for mobile users with decent sized screens and for those forum owners who want to run a separate domain (i.e. me).

dartho
21 May 2008, 23:17
Fixing up titles:

Edit the headinclude template and remove:
<title>$vboptions[bbtitle] Mobile</title>
Then edit the showthread template and add:
<title>$thread[prefix_plain_html] $thread[title]<if condition="$pagenumber>1"> - <phrase 1="$pagenumber">$vbphrase[page_x]</phrase></if> - $vboptions[bbtitle]</title>
after the text $headinclude


Then edit the forumdisplay template and add:
<title>$foruminfo[title_clean]<if condition="$pagenumber>1"> - <phrase 1="$pagenumber">$vbphrase[page_x]</phrase></if> - $vboptions[bbtitle]</title>
after the text $headinclude


Then edit the FORUMHOME template and add:
<title>$vboptions[bbtitle] Mobile</title>
after the text $headinclude

dartho
21 May 2008, 23:27
In relation to search engines. I started showing this style to Yahoo (my ranking sucks on Yahoo anyway, so I wasn't too concerned about negative side effects and it's always crawling with Yahoo spiders) only yesterday and noticed that my bandwidth usage for the day dropped significantly!

It's hard to tell after only a day, but anywhere between 25% and 50% which is 250 - 500MB on my site!

swissbob
22 May 2008, 00:15
Thanks for the titles solution. That will make a huge difference. I love this style on a separate domain that you have created.

Now we just need a hook and plugin for the adsense. Any idea how to add those?

We shouldn't underestimate the worth of the mobile Adsense. I have one other site (not a forum) that has a mobile version and the mobile adsense consistently out performs the main adsense, despite having about 1/3 of the traffic.

dartho
22 May 2008, 04:02
New version released - Changes above (post 113) have now been integrated, also added ad_location hooks (be aware that if you have an ad management system these may now be used and display non mobile ads in your style!)

I also played with integrating Google Mobile Adsense - I have done it (I think - it may take a couple days for teh ads to start showing, but it looks promising from the HTML source code of my site) on SHOWTHREAD as below:

Edit: See post 134 (http://www.vbulletin.org/forum/showpost.php?p=1531419&postcount=134) for mobile ads integration information...

TechGuy
22 May 2008, 05:25
Looks great! Even Opera Mobile likes it. :)

Hornstar
22 May 2008, 11:31
I installed it, and selected it on my pc, but how do I go back to my other skin now? I dont see any skin selection drop down box.

swissbob
22 May 2008, 11:39
Anyone want to test this stuff and let us know how it goes? I've added all the other ad_location hooks - just need to determine the best vbulletin hooks to use to populate them.
OK, my ads haven't appeared yet, but some test text is in place, thank you.

As for locations, which hooks have you included? showthread_start appears to put the ad code right at the top, above the HEAD section, which I think will cause it to fail validation and breaks the cookies for mobile browsers (i.e. breaks the website).

Ideally, we would want it after the HEAD, and just before the content. Any idea which hook corresponds to this position for every page?

Hornstar
22 May 2008, 11:57
Thanks, ive noticed a few slight things, but hopefully you will continue to update and support this skin, because it looks promising! thanks.


Just wonder tho, I have a donation hack installed and it is showing on my mobilie skin, any idea how I will remove this from just the mobile skin? www.gamerzneeds.net/forums

Thanks.

dartho
22 May 2008, 12:04
It shouldn't put the code at the top - it should put it in place of $ad_location['ad_showthread_beforeqr'] which appears in the showthread template. "Show Thread Start" is just a suitable hook location to run the google script to obtain the ad code for showing ads in SHOWTHREAD...

Wanna PM me your site URL so I can have a squizz?

dartho
22 May 2008, 12:07
@hornstar - there is no style chooser with this style. You willneed to add a "&styleid=xx" (where xx is your default styleid nnumber) to the URL to get back to your default...

Jase2
22 May 2008, 15:28
Thanks for the update, Dartho! :)

Mr.samy
22 May 2008, 20:31
thanks for supported ...

i install it ...
and i set up Mobile Phone / iPhone / PDA Detection and Style Assignment

if i make google bot redirct to this style is good for seo or bad ?

dartho
22 May 2008, 22:55
@Mr.samy - not sure if this would improve SEO or not. There is one question in my mind however - I *believe* that you must present search engines with teh same content as you do visitors otherwise you risk being dropped from search engine data bases for trying to deceive them. If someone in the know could share, that'd be great.

swissbob
23 May 2008, 00:47
@Mr.samy - not sure if this would improve SEO or not. There is one question in my mind however - I *believe* that you must present search engines with teh same content as you do visitors otherwise you risk being dropped from search engine data bases for trying to deceive them. If someone in the know could share, that'd be great.
Yup, that sounds like 'bait and switch', which is highly frowned upon, although in this case he is, in theory, showing the same content, just not the same layout. No one seems to have a problem using the archive for search engine promotion, so I guess he will be OK.

The problem is that if the risk doesn't pay off and the site gets banned it is a nightmare trying to get back in.

Hornstar
24 May 2008, 00:02
@hornstar - there is no style chooser with this style. You willneed to add a "&styleid=xx" (where xx is your default styleid nnumber) to the URL to get back to your default...

Is there a way to have the style chooser at the bottom?

dartho
24 May 2008, 01:39
You could edit your footer template and add the following at the very top of the template:

<if condition="$show['quickchooser']">
<div>
<select name="styleid" onchange="switch_id(this, 'style')">
<optgroup label="$vbphrase[quick_style_chooser]">
$quickchooserbits
</optgroup>
</select>
</div>
</if>


This code won;t have any effect if you are using the mobile autodetect add-on or the different domain, different style addon as these addons *force* the style...

HFB
24 May 2008, 03:05
You could edit your footer template and add the following at the very top of the template:

<if condition="$show['quickchooser']">
<div>
<select name="styleid" onchange="switch_id(this, 'style')">
<optgroup label="$vbphrase[quick_style_chooser]">
$quickchooserbits
</optgroup>
</select>
</div>
</if>


This code won;t have any effect if you are using the mobile autodetect add-on or the different domain, different style addon as these addons *force* the style...

That shows the dropdown menu but it doesn't load another style when it's selected. There probably needs to be other stuff added to support it. The simplest way is to hardcode in a link to your default style there. Nice job on the design! :)
eg:
<td><a href="http:/index.php?styleid=xx">Switch to Default Style</a></td>

dartho
24 May 2008, 03:24
You're right - need to include some javascript as well .... oops..

dartho
24 May 2008, 07:24
I've looked through the vBulletin js files and pulled out he script needed to make the quick style chooser work - this will of course only work on mobile devices that support javascript and if teh style is not being force by an add-on.

Add the following to the very top of your footer template:


<if condition="$show['quickchooser']">
<script type="text/javascript">
<!--
var is_regexp=(window.RegExp)?true:false;
function switch_id(C,E){var F=C.options[C.selectedIndex].value;if(F==""){return }var B=new String(window.location);var A=new String("");B=B.split("#");if(B[1]){A="#"+B[1]}B=B[0];if(B.indexOf(E+"id=")!=-1&&is_regexp){var D=new RegExp(E+"id=\\d+&?");B=B.replace(D,"")}if(B.indexOf("?")==-1){B+="?"}else{lastchar=B.substr(B.length-1);if(lastchar!="&"&&lastchar!="?"){B+="&"}}window.location=B+E+"id="+F+A}
// -->
</script>
<div>
<select name="styleid" onchange="switch_id(this, 'style')">
<optgroup label="$vbphrase[quick_style_chooser]">
$quickchooserbits
</optgroup>
</select>
</div>
</if>


Alternatively (or additionally) you can add the style chooser to modifyoptions template (which will not require javascript enabled to work)

Just add:

<if condition="$show['quickchooser']">
<div class="windowbg2">Style Chooser</div>
<span>
<select name="styleid">
<optgroup label="$vbphrase[quick_style_chooser]">
$quickchooserbits
</optgroup>
</select>
</if>
</span>
<br />


before


<div>
<input type="hidden" name="securitytoken" value="$bbuserinfo[securitytoken]" />
<input type="submit" class="button" value="$vbphrase[save_changes]" accesskey="s" />
<input type="reset" class="button" value="$vbphrase[reset_fields]" accesskey="r" />
</div>


in the modify options template

swissbob
25 May 2008, 13:00
Dartho, are your adsense ads appearing yet? I have nothing.

dartho
25 May 2008, 13:45
No - having played with it a little more, I think something is not quite right with it. Also I noticed that at one stage I got the ads, but after a couple refreshes the ads vanished and I was back to only having comments? :confused:

dartho
26 May 2008, 02:45
OK - I think I have working properly now. Code for plugin below. Ads don;t show up all teh time and after a bunch of refreshes they go a way for a while. This is a google thing and I guess it depends on your sites content and who is advertising? Anyway - the following seems to work for me. It is set for showing ads just before the quick reply, but you can change the ad_location in the code to show them after first post by searching and replacing ad_showthread_beforeqr for ad_showthread_firstpost in the plugin code...



Get your mobile adsense PHP code - here's the code Google game me (DO NOT USE THIS - GET YOUR OWN)

<?php

$GLOBALS['google']['ad_type']='text';
$GLOBALS['google']['channel']='0000000000';
$GLOBALS['google']['client']='pub-0000000000000000';
$GLOBALS['google']['format']='mobile_single';
$GLOBALS['google']['https']=$_SERVER['HTTPS'];
$GLOBALS['google']['host']=$_SERVER['HTTP_HOST'];
$GLOBALS['google']['ip']=$_SERVER['REMOTE_ADDR'];
$GLOBALS['google']['markup']='xhtml';
$GLOBALS['google']['oe']='utf8';
$GLOBALS['google']['output']='xhtml';
$GLOBALS['google']['ref']=$_SERVER['HTTP_REFERER'];
$GLOBALS['google']['url']=$_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
$GLOBALS['google']['useragent']=$_SERVER['HTTP_USER_AGENT'];
$google_dt = time();
google_set_screen_res();

function google_append_url(&$url, $param, $value) {
$url .= '&' . $param . '=' . urlencode($value);
}

function google_append_globals(&$url, $param) {
google_append_url($url, $param, $GLOBALS['google'][$param]);
}

function google_append_color(&$url, $param) {
global $google_dt;
$color_array = split(',', $GLOBALS['google'][$param]);
google_append_url($url, $param,
$color_array[$google_dt % sizeof($color_array)]);
}

function google_set_screen_res() {
$screen_res = $_SERVER['HTTP_UA_PIXELS'];
$delimiter = 'x';
if ($screen_res == '') {
$screen_res = $_SERVER['HTTP_X_UP_DEVCAP_SCREENPIXELS'];
$delimiter = ',';
}
$res_array = explode($delimiter, $screen_res);
if (sizeof($res_array) == 2) {
$GLOBALS['google']['u_w'] = $res_array[0];
$GLOBALS['google']['u_h'] = $res_array[1];
}
}

function google_get_ad_url() {
$google_ad_url = 'http://pagead2.googlesyndication.com/pagead/ads?';
$google_scheme = ($GLOBALS['google']['https'] == 'on')
? 'https://' : 'http://';
foreach ($GLOBALS['google'] as $param => $value) {
if ($param == 'client') {
google_append_url($google_ad_url, $param,
'ca-mb-' . $GLOBALS['google'][$param]);
} else if (strpos($param, 'color_') === 0) {
google_append_color($google_ad_url, $param);
} else if ((strpos($param, 'host') === 0)
|| (strpos($param, 'url') === 0)) {
google_append_url($google_ad_url, $param,
$google_scheme . $GLOBALS['google'][$param]);
} else {
google_append_globals($google_ad_url, $param);
}
}
google_append_url($google_ad_url, 'dt',
round(1000 * array_sum(explode(' ', microtime()))));
return $google_ad_url;
}

$google_ad_handle = @fopen(google_get_ad_url(), 'r');
if ($google_ad_handle) {
while (!feof($google_ad_handle)) {
echo fread($google_ad_handle, 8192);
}
fclose($google_ad_handle);
}

?>


I had to move al the functions to the top of the code block for it to work in a plug in I created a called "Google Adsense Mobile" on the showthread_start hook. Here is the working plugin code:

if ($styleid == xx) {
function google_append_url(&$url, $param, $value) {
$url .= '&' . $param . '=' . urlencode($value);
}

function google_append_globals(&$url, $param) {
google_append_url($url, $param, $GLOBALS['google'][$param]);
}

function google_append_color(&$url, $param) {
global $google_dt;
$color_array = split(',', $GLOBALS['google'][$param]);
google_append_url($url, $param,
$color_array[$google_dt % sizeof($color_array)]);
}

function google_set_screen_res() {
$screen_res = $_SERVER['HTTP_UA_PIXELS'];
$delimiter = 'x';
if ($screen_res == '') {
$screen_res = $_SERVER['HTTP_X_UP_DEVCAP_SCREENPIXELS'];
$delimiter = ',';
}
$res_array = explode($delimiter, $screen_res);
if (sizeof($res_array) == 2) {
$GLOBALS['google']['u_w'] = $res_array[0];
$GLOBALS['google']['u_h'] = $res_array[1];
}
}

function google_get_ad_url() {
$google_ad_url = 'http://pagead2.googlesyndication.com/pagead/ads?';
$google_scheme = ($GLOBALS['google']['https'] == 'on')
? 'https://' : 'http://';
foreach ($GLOBALS['google'] as $param => $value) {
if ($param == 'client') {
google_append_url($google_ad_url, $param,
'ca-mb-' . $GLOBALS['google'][$param]);
} else if (strpos($param, 'color_') === 0) {
google_append_color($google_ad_url, $param);
} else if ((strpos($param, 'host') === 0)
|| (strpos($param, 'url') === 0)) {
google_append_url($google_ad_url, $param,
$google_scheme . $GLOBALS['google'][$param]);
} else {
google_append_globals($google_ad_url, $param);
}
}
google_append_url($google_ad_url, 'dt',
round(1000 * array_sum(explode(' ', microtime()))));
return $google_ad_url;
}

$GLOBALS['google']['ad_type']='text';
$GLOBALS['google']['channel']='0000000000';
$GLOBALS['google']['client']='pub-0000000000000000';
$GLOBALS['google']['format']='mobile_single';
$GLOBALS['google']['https']=$_SERVER['HTTPS'];
$GLOBALS['google']['host']=$_SERVER['HTTP_HOST'];
$GLOBALS['google']['ip']=$_SERVER['REMOTE_ADDR'];
$GLOBALS['google']['markup']='xhtml';
$GLOBALS['google']['oe']='utf8';
$GLOBALS['google']['output']='xhtml';
$GLOBALS['google']['ref']=$_SERVER['HTTP_REFERER'];
$GLOBALS['google']['url']=$_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
$GLOBALS['google']['useragent']=$_SERVER['HTTP_USER_AGENT'];
$google_dt = time();
google_set_screen_res();

$find='"';
$replace="'";
$googlemad = '';

$google_ad_handle = @fopen(google_get_ad_url(), 'r');
if ($google_ad_handle) {
while (!feof($google_ad_handle)) {
$googlemad .= fread($google_ad_handle, 8192);
}
fclose($google_ad_handle);
}
$vbulletin->templatecache['ad_showthread_beforeqr'] = str_replace($find,$replace,$googlemad);

}


You'll see I wrapped the google code in a conditional if ($styleid == xx) { ... } where xx is the styleid of my mobile style - you will need to change this and removed the opening and closing php tags.

The other changes (after moving the functions to the top) were:
1. replace

$google_dt = time();
google_set_screen_res();


with

$google_dt = time();
google_set_screen_res();

$find='"';
$replace="'";
$googlemad = '';



2. replace
echo fread($google_ad_handle, 8192);
}
fclose($google_ad_handle);
}

with

$googlemad .= fread($google_ad_handle, 8192);
}
fclose($google_ad_handle);
}

$vbulletin->templatecache['ad_showthread_beforeqr'] = str_replace($find,$replace,$googlemad);


That's about it. You could modify and or duplicate this to work with other ad_locations. Current defined ad_locations in vBulletin 3.7 (and this style) and the likely best hook location for these ads are (i'm not so sure about the ones in blue - they should work there, but there may be a more efficient place to put them. Feedback welcomed!):

ad_footer_start - global_start
ad_footer_end - global_start
ad_forumdisplay_afterthreads - forum_display_start
ad_forumhome_afterforums - forum_home_start
ad_header_end - global_start
ad_header_logo - global_start
ad_navbar_below - global_start
ad_showthread_beforeqr - showthread_start
ad_showthread_firstpost - showthread_start

Hope this helps!

TechGuy
26 May 2008, 04:38
That works great, dartho. Thanks!

dartho
26 May 2008, 05:14
Thanks TechGuy - post 134 (http://www.vbulletin.org/forum/showpost.php?p=1531419&postcount=134) updated with better instructions and info on showing mobile ads elsewhere on your site

dartho
26 May 2008, 08:35
I'm looking at making a product to go along with this style so some aspects of it may be turned on/off.

Some examples are:

Insert a link to the default style in the navbar/footer
Customise/disable "Posted Via Mobile Device" message on new posts
Customise "Home" link (so no need to edit navbar template)
Display images (as opposed to just a link to the image)


What other options do you think would be good in such a product?

swissbob
26 May 2008, 12:04
I'm looking at making a product to go along with this style so some aspects of it may be turned on/off.

Some examples are:

Insert a link to the default style in the navbar/footer
Customise/disable "Posted Via Mobile Device" message on new posts
Customise "Home" link (so no need to edit navbar template)
Display images (as opposed to just a link to the image)


What other options do you think would be good in such a product?
Titles and meta tags please!

dartho
26 May 2008, 12:37
Titles should be fixed (ie. same as default style) as of the last version.

What do you suggest for meta tags?

swissbob
26 May 2008, 18:58
Titles should be fixed (ie. same as default style) as of the last version.

What do you suggest for meta tags?
Description and keywords.

For the Description, use the first 100 characters of the first posting in the page - this is what VbSEO does (although they use 150 characters by default. For categories, use the category description.

For the keywords, perhaps use the tags and/or title without the stop words. Or just use tags where they exist and leave it blank if they don't.

RCK
26 May 2008, 21:14
@dartho: it's nice to see how this style has evolved ! :up:

Here are a few more suggestions:
I got requests to have today's post and new post in navbar
navbar template
<if condition="$show['member']">
<a class="navbar" href="/search.php?$session[sessionurl]do=getnew">
Unread posts</a>
<a class="navbar" href="/search.php?$session[sessionurl]do=getdaily">
Today's posts</a>
...
Add "mobile" to board title, just to know it's a different version
header template
<div class="header" align="center"><b>$vboptions[bbtitle] Mobile ...
the skin is missing a way to open the search page.
time and date stamp on new posts page is too vague, is there a way to see 'hh:mm ago' instead of 'today' or 'yesterday' ?

dartho
27 May 2008, 05:09
@RCK - Point 4 was taken care of in one of the recent versions.

At the moment, if a user is logged in they get a "New Posts" link, if they are not logged in, they get a Todays Posts link. It shouldn't be hard to have options in a 'companion product' for this style so that the navbars can be customised without template edits - good idea :up:

"Mobile" is appended to the title on forum home, and forum/thread names are used in other pages (since last version I think?)

I haven't yet got around to coding up a mobile search page - thus no links.

If anyone has made modifications to templates/pages which they think would do well to be incorporated into this style, I'd be happy to have a look and implement them also if suitable..

nike.stars
27 May 2008, 07:45
bug report:

space isn't working in opera mobile integrated in UIQ 3.0 (M600i / P990i / P1i / W950i / W960i) when typing in the quick reply box

dartho
27 May 2008, 07:50
Have you tried installing the latest version - 0.0.6 ? I think this was resolved there... maybe...

[Edit: sorry - re-read you post and realised you're probably talking about something different. Q. Does space work in the full style in the quick reply box from your device?]

nike.stars
27 May 2008, 08:00
try to download the latest version and it doesn't seems to be fixed, i've try to use my standard skin (vbseo skin) and the space character works normally, maybe a bug in the text area formatting?

btw, as an addition, maybe you should consider to include the skin selector in this skin in case some desktop users mis-select this skin and can't revert back to the standard one :)

dartho
27 May 2008, 08:07
Not sure how far wrong it can go... here's the code:

<div>
<form action="newreply.php" method="post">
<textarea name="message" rows="10" cols="30" style="height:100px;width:100%" tabindex="1">

Posted via Mobile Device</textarea><br />
<input type="hidden" name="wysiwyg" value="0" />
<input type="hidden" name="fromquickreply" value="1" />
<input type="hidden" name="s" value="" />
<input type="hidden" name="do" value="postreply" />
<input type="hidden" name="t" value="$threadid" id="qr_threadid" />
<input type="hidden" name="p" value="who cares" id="qr_postid" />
<input type="hidden" name="parseurl" value="1" />
<input type="hidden" name="clickedelm" value="" />
<input type="hidden" name="securitytoken" value="$bbuserinfo[securitytoken]" />
<input type="submit" class="button" value="Post Reply" />
</form>
</div>


You could perhaps try editing the showthread template and remove the extra line and the "Posted via Mobile Device" ?

BTW - the code for style chooser is here: http://www.vbulletin.org/forum/showpost.php?p=1529731&postcount=131

I haven't included it by default as I don't need or want it for my implementation of this style - I don;t allow my members to choose their own styles. I will however be releasing an add-on to go with this style in the future so options such as that can be turned on and off in the AdminCP

nike.stars
27 May 2008, 08:22
thanks for the tips, it works fine now by just removing that extra line and the text following it :D do you have any idea why that happen?

thanks for the style chooser code too, i appreciate that :)

look forward for the additional add-on..

dartho
27 May 2008, 08:33
no idea :confused: I'd guess Opera just didn't like the blank line. textareas are allowed to have default text in them... If you wished to keep the message there, perhaps try without the blank line?

nike.stars
27 May 2008, 08:41
yes, the default text are okay, except the extra blank line causing space character trouble :)

stinger2
27 May 2008, 18:39
i upgraded my forum to 3.7 JUST to use this skin

and installed and it is working fast on my pda

RCK
27 May 2008, 21:02
"Mobile" is appended to the title on forum home, and forum/thread names are used in other pages (since last version I think?)
I was speaking of the "header" template, in order to display <board name> Mobile at the top of the html table :)

Cool about all admincp triggers you are speaking about, it seems promising :D

One final think, the modifyoptions style template modification (http://www.vbulletin.org/forum/showpost.php?p=1510943&postcount=57) of Crimm would be a better addition than quick link chooser (javascript should be avoid for mobile device), this also could be added to admincp triggers ! ;)

dartho
28 May 2008, 00:08
Ah - that was actually in the header at one stage, must've got lost along the way!

Crimm's suggestion also requires javascript - if it is working, then then entire vbulletin javascript must already be included somewhere. You can of course copy the code I pasted up into the modifyoptions template if that's where you want it.

If someone is using a mobile device without javascript enabled then the style chooser won;t actually do anything - which is probably a good thing as a device/browser that doesn't support javascript would probably have heart failure if presented with a full vbulletin style!

swissbob
28 May 2008, 20:29
I still don't have any adsense appearing :(

RCK
28 May 2008, 21:09
Crimm modifyoptions template doesn't require javascript ! :)
I mean, it only add the style selectbox into the option page, which is saved by clicking on the form input button: 'save change'.

ps: it's true that full vB js code would kill any mobile device ;)

RCK
28 May 2008, 22:00
Hello dartho, here are another suggestions.
(I got very active mobile members :p)

Stickies thread doesn't display the time.
Polls are not displayed with their topics on the mobile skin. Currently i need to open these topics in the normal skin to be able to participate in a poll.
In todays page, the number of posts are not displayed.
(user comment: Extreme high prices for mobile bandwith usage has the effect i'd rather view topics with fewer posts. Plus call me strange but i found it much easier to figure out if i'd read a topic by the number of posts than by who made the last post.)Many thanks ;)

dartho
28 May 2008, 23:22
RCk - You're right *slaps head I'll keep the other suggestions in mind for the next update

@Swissbob - mine are showing up now, not all the time and not in every thread but they seem to be working. I don't actually use advertising on my site and was surprised when I saw them when browsing from my phone yesterday!

callumbush
29 May 2008, 22:01
Hi Dartho,

Hope you're well?

If I am viewing a thread with multiple attachments, this style doesn't work great as it lists each attachment in one single line (i.e. it doesn't indent them), which makes the page extremely wide and therefore you have to zoom to view it (I was using Opera mini btw).
There is also no gap between the names of each attachment, which makes them even harder to read/distinguish.

Also, you cannot see how big an attachment is. It is really important to know this if you are using the phone as data charges are extortionate.

Can these be fixed in the next version? :) (I'm using an old version so they might be fixed already?)

Also:

1) - I'm very new to vBulletin and i'm not sure how I update to the newest version, can you advise?

Many thanks

Callum

SemperFideles
30 May 2008, 04:48
Great work. I like the new colors. Quick question: I'm using vBadvanced CMPS and have a left sidebar associated with search.php (among others). The older version of the mobi somehow excluded the sidebar when this theme was selected. Is there a way to disable the CMPS for this theme?

dartho
30 May 2008, 05:09
@CallumBush - to upgrade, I usually install fresh each time, test, and then delete the previous version when I am happy with the new one. It's safe, you can revert back to using a previous version with no trouble and you can test a new version whilst keeping the old one running for you members.


@SemperFideles - Thanks

To disable (in a manner of speaking) vBadvanced, edit the adv_portal template in the mobile style and replace it's contents with the following or something similar:


$stylevar[htmldoctype]
<html>
<head>
$headinclude
<meta http-equiv="Refresh" content="2; URL=forum.php" />
</head>
<body>

$header

$navbar
<div align="center"><a href="forum.php">Portal Disabled in Mobile View - Click here if your browser does not automatically redirect you.</a></div>

$footer

</body>
</html>


I think previously I had the adv_portal template edited to only show the centre column.

You can do this by removing the left and right column block conditionals in the template in your mobile style. Find and delete the following 2 blocks of code:


<if condition="$show['left_column']">
<td width="$vba_style[portal_leftcolwidth]"<if condition="$show['center_column'] OR $show['right_column']"> style="padding-$stylevar[right]: $vba_style[portal_colspacing]px"</if>>
$home[leftblocks]
</td>
</if>


<if condition="$show['right_column']">
<td valign="top" width="$vba_style[portal_rightcolwidth]"<if condition="$show['center_column'] OR $show['left_column']"> style="padding-$stylevar[left]: $vba_style[portal_colspacing]px"</if>>
$home[rightblocks]
</td>
</if>

SemperFideles
30 May 2008, 05:40
Thanks Dartho. The second option solved the problem. The first option sort of puts it into a "loop" since I have vBadvanced integrated into forums.php. Any page with that integrated would be redirected to forums.php so deleting the columns did the trick!

dartho
30 May 2008, 14:23
I got the next version ready to go with many of the suggestions incorporated (no companion product yet though so some things still have to wait) - anyone care to test it for a day or two before I release send me a PM. I'm one of very few mobile users on my site so my 'live' testing isn't that thorough ...

Added search page (replace online link for search), added more attachmenst information, added more time information, added number of posts in threads, drank some beers...

Screen real estate is pretty limited on devices, and I dont; have labels for things such as the number of threads. I'm open to suggestions on how to display information. Bear in mind I want to keep this style usable on a wide range of devices.

many thanks

tekguru
31 May 2008, 09:08
The guys just advised they get the vB 3.7.x security token error warnign if trying to delete a post from the mobile portal.

P.S. Quite happy to test the new version as we have a lot of mobile users.

dartho
02 Jun 2008, 01:25
Here's a pre-release which has had incredibly little testing. Use at own risk and let me know how it goes and I'll release...

also added basic poll viewing/voting in addition to the mentioned updates a couple posts back

Thanks!

tekguru
02 Jun 2008, 06:41
And installed!

tekguru
02 Jun 2008, 20:08
Comments on the Alpha style from my team....


Mobile Portal appears to have gone loco!

When clicking on NEW POSTS get prompt for login for realm "development".

Site: vbdev.twf.com.au

.. can get to front page - but cannot click on new posts.

I'm showing no new posts - except this one. Also have a visitor message showing as new that is definately old.

My issue is on the standard web page just to identifiy it.

This post appears to have disappeared from the list of posts - just after I edited my comments.

Mobile portal appears to load and then up pops the login page for the site above.

ok its back - this post and the other "new" ones are showing again - now I am confused

it's still prompting me for that development password

If it is prompting for a pword for a REALM, that is a Linux term... Same as the windows DOMAIN...

Hope that makes sense! Needless to say we had to switch back to the prior version.

dartho
02 Jun 2008, 23:42
I really didn't do well with anything to do with coding or vbulletin over the weekend :( That last attachment wasn't even the mobile style. I think I need to get more sleep....

Try this one, tekguru or anyone else that is game. Same disclaimers - This is a pre-release version of this style - *use at own risk* - but let me know how it goes :)

Don;t forget to modify the Home link in the navbar template

Fireproof
03 Jun 2008, 22:03
I'm clueless about style creation, so forgive my newbie question.

I installed this style and it works great on my Blackberry 8800. However, instead of using my "default font size setting" on my blackberry, the style seems to be forcing a font size that is bigger than I would like.

Where/how would I change the font size in the style for everything?

dartho
04 Jun 2008, 03:18
To use a devices default font sizes, edit the wireless.css file remove "10pt " from the first font decalration (in the body section) and then remove all "size:x" lines from the rest of the file

GrendelKhan{TSU
04 Jun 2008, 03:27
so far so good...
the only major problem I have is I can't figure how to go back to another style once I've switched over to mobile.

there needs to be a style chooser even in the mobile version. (unless I just missed it).

Fireproof
04 Jun 2008, 04:12
To use a devices default font sizes, edit the wireless.css file remove "10pt " from the first font decalration (in the body section) and then remove all "size:x" lines from the rest of the file

Very cool. Worked perfectly. Thanks so much for the quick reply.

dartho
04 Jun 2008, 07:26
To add style selection options check HERE (http://www.vbulletin.org/forum/showpost.php?p=1529731&postcount=131) for style chooser code - it will become an option one of these days..

I wrote this style to work with my mobile detect add-on, so teh user never actually gets a choice on my site. The get the sites default if visiting from a PC or the mobile style if visiting from a mobile device.

An update on showing this style to Yahoo. I can confirm my bandwidth has dropped by about 10GB/month by forcing Yahoo spiders to the mobile style :eek:

Fireproof
05 Jun 2008, 02:54
To add style selection options check HERE (http://www.vbulletin.org/forum/showpost.php?p=1529731&postcount=131) for style chooser code - it will become an option one of these days..

I wrote this style to work with my mobile detect add-on, so teh user never actually gets a choice on my site. The get the sites default if visiting from a PC or the mobile style if visiting from a mobile device.

An update on showing this style to Yahoo. I can confirm my bandwidth has dropped by about 10GB/month by forcing Yahoo spiders to the mobile style :eek:


That's how I like it - force it to mobile for phones, and a default on the site. I like to control how my site looks to others.

Quick question: A user has reported that the first time he tried this skin after I loaded this up with your mobile detect add-on, he couldn't see where to log-in. I was already logged in when I switched skins, so it never occured to me.

Is there a Log-In link in the skin somewhere?

dartho
05 Jun 2008, 04:32
You can login in the footer of every page - should be a username/password prompt down there when not logged in...

SAT2M
05 Jun 2008, 19:13
@SAT2M - Not sure - but questions in regards to that add-on should probably be asked in its' thread.

@SwollenCranium - what sort of device are you posting from? Also - what are teh URL's which are giving you issues.


I check the siite with Sonyerricsson P990i & this is my site url

www.best2m.org/main.php

dartho
05 Jun 2008, 23:52
I check the siite with Sonyerricsson P990i & this is my site url

www.best2m.org/main.php

You need to make sure the style is user selectable - that the checkbox next to it in Style Manager is checked. Even if you don;t allow users to change styles, it needs to be checked so that other addons such as the mobile device autodetect can load the style up.

JustJon
07 Jun 2008, 00:33
I dig this style alot, but is there any way to allow it to view images? My users would like to be able to see the pictures and smileys posted by other users. Thanks.

Dr. Bantham
07 Jun 2008, 02:30
How can you change back to a different style once this one is selected? I could find no link, which is especially troublesome if a desktop user changes to this style and is not able to revert back to a full style.

dartho
07 Jun 2008, 02:53
@Dr Bantham - scroll up about 6 posts before yours :)

@JustJon - deleting the following replacement variables form the mobile style options should put images back in line:

border="0" alt="" />

class="inlineimg" />

img src

dartho
07 Jun 2008, 13:40
Updated.

Version 0.0.7 - Added Style chooser to UserCP, Post count to threads, Search Page, Attachment Sizes, More detailed time info, viewing/voting in polls, other stuff too probably

Don;t forget to edit teh navbar template to point the "Home" link at your forums if your forums home page is not index.php

SAT2M
07 Jun 2008, 15:46
You need to make sure the style is user selectable - that the checkbox next to it in Style Manager is checked. Even if you don;t allow users to change styles, it needs to be checked so that other addons such as the mobile device autodetect can load the style up.

I do this setting & style now is selectable with users but auto detect dont work in mobile phone

www.best2m.org/main.php

Fireproof
07 Jun 2008, 17:11
Updated.

Version 0.0.7 - Added Style chooser to UserCP, Post count to threads, Search Page, Attachment Sizes, More detailed time info, viewing/voting in polls, other stuff too probably

Don;t forget to edit teh navbar template to point the "Home" link at your forums if your forums home page is not index.php

Awesome!

nike.stars
07 Jun 2008, 17:55
@JustJon - deleting the following replacement variables form the mobile style options should put images back in line:

border="0" alt="" />

class="inlineimg" />

img src

is there a way just to show up the smiley?

nike.stars
07 Jun 2008, 18:53
for those interested, i made lite edition of "what's going on?" box for this theme, you can place this code at FORUMHOME template before the $footer


<!-- what's going on box -->
<div class="titlebg">$vbphrase[whats_going_on]</div>

<if condition="$show['loggedinusers']">

<!-- logged-in users -->
<div class="navbar"><a href="online.php$session[sessionurl_q]">$vbphrase[currently_active_users]</a>:</div>
<div class="oldwindowbg">$activeusers</div>
<!-- end logged-in users -->

</if>
<div class="navbar"><phrase 1="$vboptions[bbtitle]">$vbphrase[x_statistics]</phrase></div>
<div class="oldwindowbg">
<b>$vbphrase[threads]:</b> $totalthreads<br />
<b>$vbphrase[posts]:</b> $totalposts<br />
<b>$vbphrase[members]:</b> $numbermembers<br />
<if condition="$show['activemembers']">
<b>$vbphrase[active_members]:</b> $activemembers<br /><br />
</if>
<phrase 1="member.php?$session[sessionurl]u=$newuserid" 2="$newusername">$vbphrase[welcome_to_our_newest_member_x]</phrase>
</div>
<if condition="$show['birthdays']">

<!-- today's birthdays -->
<div class="navbar">$vbphrase[todays_birthdays]</div>
<div class="oldwindowbg">$birthdays</div>
<!-- end today's birthdays -->

</if>
<if condition="$show['upcomingevents']">
<if condition="$show['todaysevents']">
<div class="navbar">$vbphrase[todays_events]</div>
<else />
<div class="navbar"><phrase 1="$vboptions[showevents]">$vbphrase[upcoming_events_for_the_next_x_days]</phrase></div>
</if>

<div class="oldwindowbg">$upcomingevents</div>

</if>

<br />
<!-- end what's going on box -->

Hornstar
07 Jun 2008, 22:14
anychance you can put the style chooser in the default location of down the bottom on the forum home page?

also, for the vbulletin copyright, I think you are doing it differently, because I have branding free, and in all my other styles the copyright is not there, but in this style the copyright is showing. Maybe you did this to speed up the skin? but I feel it is something that should be left in tact, as the copyright date is off now anyway.

Hornstar
07 Jun 2008, 22:18
I dont see any style chooser at all in the usercp, where is it?

Also, how do I moderate the forums from this skin? I couldnt work out how to close threads or do anything like that.

dartho
07 Jun 2008, 23:46
@SAT2M - Have you installed and configured teh Auto-detect addon here: http://www.vbulletin.org/forum/showthread.php?t=173239 ?

@Hornstar - no moderation. You can delete threads/posts but thats about it. Style Chooser is in the Edit Options in UserCP (I just noticed that the title shows even of the user has no permissions to change styles). There are instructions on putting style chooser where you want back a page or two HERE (http://www.vbulletin.org/forum/showpost.php?p=1529731&postcount=131)

As for the copyright messages etc - the default uses half the screen so I entered in the minimum allowed. I however didn't want to modify the default phrases so I hard coded it. It's a pretty simple edit to make in the footer template. I'll look at making it an option to have default copyright messages or the reduced one in the future

@nike.stars - nice addition - I may put those in as options when I eventually release a companion addon for this style to allow individual customization without editing templates.

Daghis
08 Jun 2008, 01:17
What a nice style to add to my just-upgraded forum. Thanks!

I did notice that if I go into the mobile style and then switch back from within the mobile's User CP, some of my other options are lost, such as time zone, DST usage, editor choice, and default subscription mode.

I didn't see anyone else notice this, so I'm thinking that perhaps I didn't set up something right. I'm going to need to look and see if I somehow messed up the User CP code when I uploded it to the forum.

dartho
08 Jun 2008, 01:27
ooo... That sounds like a bug. It would appear that any options that aren;t explicitly saved in the screen get lost which I think means I will need to add *all* options form the full "Edit Options" screen to the mobile version, or find another way to update them so existing options are preserved....

IN the mean time see here (http://www.vbulletin.org/forum/showpost.php?p=1529731&postcount=131) for otehr ways to implement style changing ...

abrecher
08 Jun 2008, 07:44
Great style! Does anybody know how I can create a mobile sitemap for this style to submit to Google ?

dartho
08 Jun 2008, 10:03
Would a mobile sitemap be any different than a non-mobile sitemap? URL's would be the same, just a different style?

Zaiaku
09 Jun 2008, 03:21
had to do a little editing but works great and fast too, even my mods still worked with this one, thx

tekguru
09 Jun 2008, 19:58
Comments from my Modrators, all positive:

I noticed the changes when I jumped on this evening before seeing this post.

Because of this I have just voted in one of the Polls
--
I can see the tags bit at the bottom of the posts now on the mobile portal!
--
That is a great evolution! The search feature is excellent, and the post count/time of last post very useful.

IMHO for me I'd add in nike.stars mod as a standard....

Daghis
10 Jun 2008, 03:24
IN the mean time see here (http://www.vbulletin.org/forum/showpost.php?p=1529731&postcount=131) for otehr ways to implement style changing ...
For now, I'm just telling people to go to mobile.domain as that avoids the issue entirely.

I did have someone report that this style doesn't handle nested quotes properly. I would imagine that fixing that problem is much more difficult. :)

Other than that, my users really like this over the previously installed mobile style. Thanks!

XnaMe
11 Jun 2008, 03:24
Hello! Why it told me Invalid File Specified when i'm trying to import?

dartho
11 Jun 2008, 12:30
XnaMe - you did import this via style manager as opposed to Products and Plugins?

BTW - I just noticed that this is the most installed 3.7.x style on vBulletin.org :D Thanks for the feedback and suggestions (and code snippets) to make it what it is. However - I really hope that when vBulletin 4.0 comes out thaey have builtin mobile support - the popularity of this rather rudimentary and novicely assembled style would have to go a long to way to proving the need and desire for a functional mobile forum is out there!

BigDog56
11 Jun 2008, 14:19
Seems to be a conflict with the MGC chat bot. From a WAP phone, you get a scripting error once you scroll to the chat box. And from opera when you try to post you get the dreaded "Security token" issue. when you try to post.

Fireproof
11 Jun 2008, 16:38
I'm loving the style - works great!!

One issue: my subforums do not show in the forum home view (list of forums). Can you make it display them here or is that not desired for those that have many subforums (I only have a few)?

Second request: how about a symbol or letter link to Quote a reply?

Thanks.

dartho
12 Jun 2008, 00:00
@Fireproof - You need to edit some templates to make this happen.

Edit the forumhome_forumbit_level?_post templates and add

<if condition="$show['subforums']"><div class="$forum[statusicon]titlebg">-- $forum[subforums]</div></if>

below
<div class="$forum[statusicon]windowbg">-&nbsp;<a href="forumdisplay.php?$session[sessionurl]f=$forum[forumid]">$forum[title]</a></div>


then edit forumhome_forumbit_level?_nopost templates and add

<if condition="$show['subforums']"><div class="$forum[statusicon]titlebg">-- $forum[subforums]</div></if>

below
<div class="windowbg">-&nbsp;<a href="forumdisplay.php?$session[sessionurl]f=$forum[forumid]">$forum[title]</a></div>


Then edit the subforumbit_nopost and subforumbit_post templates and replace the cntents with

<a href="forumdisplay.php?$session[sessionurl]f=$forum[forumid]">$forum[title]</a>


That should add the subforums listings - you probably only need to edit the level1 and level2 templates..

The reply link [rep] does quote by default - you want a quoting and non-quoting reply links?

Fireproof
12 Jun 2008, 00:23
Thanks for the help. I'll look into those edits.

Regarding the reply link, ignore my request. I had been replying just via the "quick reply" box at the bottom. I incorrectly assumed that [rep] did the same thing. I just tried it and see that it auto-quotes, so that is perfect!!

Thank you!

Hornstar
12 Jun 2008, 21:58
@Hornstar - no moderation. You can delete threads/posts but thats about it. Style Chooser is in the Edit Options in UserCP (I just noticed that the title shows even of the user has no permissions to change styles). There are instructions on putting style chooser where you want back a page or two HERE (http://www.vbulletin.org/forum/showpost.php?p=1529731&postcount=131)

As for the copyright messages etc - the default uses half the screen so I entered in the minimum allowed. I however didn't want to modify the default phrases so I hard coded it. It's a pretty simple edit to make in the footer template. I'll look at making it an option to have default copyright messages or the reduced one in the future


Thanks. Is there any reason you don't make the style chooser default?

I just added inferno shoutbox into the skin, and it just stays on loading, is there a reason that modification wont work in this skin?

dartho
12 Jun 2008, 23:49
I haven't included a style chooser by default as I don't need or want it for my implementation of this style - I don't allow my members to choose their own styles.

Does shoutbox work from your device with the default vBulletin style? If there are any automatic template edits being made by the shoutbox addon, these will quite likely fail - you'll need to make template edits manually

callumbush
15 Jun 2008, 15:13
Hi Dartho,

1)
The attachments display so much better :) but is there any way to have a space between the titles of the attachments? In threads where there are more than one attachment it looks very messy

2)
Also, I tried to post a test thread using the opera mini simulator. It will not let me post my message above the "Posted via Mobile Device"? The only solution I can find to make it work is to delete that text.

Out of interest, why did you include "Posted via mobile device"?

3)
I guess the user should also be given the option to subscribe to the thread when they post it.
I (personally) would find that useful.

4)
Can you tell me where I find the style folder for this on my ftp?
I wanted to see if these worked with it :)

http://www.vbulletin.org/forum/showthread.php?t=122944
http://www.vbulletin.org/forum/showthread.php?t=171014&page=66

dartho
16 Jun 2008, 16:36
@Callumbush:
1) Next version
2) Next version will have a companion which will do this differently and allow you to customise this message via admincp
3) Too hard - user should set things up to subscribe to all threads they post in, or use a PC when they wanna do such things :)
4) There is no style folder

I hope to have the next version released with a companion product for customising stuff tomorrow(otherwise not many changes) - although it's simple, existing users should find this pretty cool - and I look forward to more suggestions :)

dartho
17 Jun 2008, 02:54
This has now been updated to version 0.0.8



This has been updated and you can also install an addon product to customise it!

Only real changes are to integrate with add-on product - see http://www.vbulletin.org/forum/showthread.php?t=182692 for more information

mariocaz
17 Jun 2008, 04:33
Dartho I have a question, the add-on comes in this product or also I have to download and install the add-on ?

thank you.

dartho
17 Jun 2008, 04:41
This is the style only - products and styles can;t be released in same package. If you'd like to use the features in the add-on you will need to download and install that in addition to updating the style to 0.0.8.

The add-on is not required for this style to work - it just ads a few options to save people having to change templates by hand

nike.stars
17 Jun 2008, 07:04
thanks for including my "what's going on" modification, but i think you should include proper credits for me either in source code / the option :)

Darat
17 Jun 2008, 11:09
Excellent work - been promising my users for a couple of years we'd have a good mobile style and you've delivered it. Thanks

Keyser Soze
17 Jun 2008, 17:31
@dartho:
Please insert the following remaining phrases as soon as possible into the templates because it is very time consuming to replace words like "Today's Posts", "UserCP" etc. in your templates again and again after every single update (my forum's main language is not english but german).

@dartho: please make the following changes in the official templates of this style:

navbar:
replace "New Posts" with "$vbphrase[new_posts]"
replace "Today's Posts" with "$vbphrase[todays_posts]"footer:

replace "Search" with "$vbphrase[search]"
replace "Logout" with "$vbphrase[log_out]"
replace "" with "&copy;"FORUMHOME:

replace "Mark Forums Read" with "$vbphrase[mark_forums_read]"search_results:

replace "Mark Forums Read" with "$vbphrase[mark_forums_read]"USERCP:

replace "USER CONTROL PANEL" with "$vbphrase[user_cp]"
replace "Subscribed Threads" with "$vbphrase[subscribed_threads]"postbit_legacy:
replace "[Rep]" with "[$vbphrase[reply]]"
replace "[Ed]" with "[$vbphrase[edit]]"
replace
<a href=member.php?userid=$post[userid]>
with
<a href="member.php?userid=$post[userid]">
pm_newpm:

replace "New PM" with "$vbphrase[send_new_message]"MEMBERINFO:

replace "Member Information" with "$vbphrase[view_profile]: $userinfo[username]"
replace "Member:" with "$vbphrase[username]:"
replace "Title:" with "$vbphrase[user_title]:"threadbit:

remove "pg:" (everyone should know the numbers behind the thread titles)
replace "by" with "$vbphrase[posted_by]" (twice!!)threadbit_announcement:

replace "by" with "$vbphrase[posted_by]"threadbit_deleted:

replace "by" with "$vbphrase[posted_by]"forumdisplay:

replace "Threads" with "$vbphrase[threads]"
replace "New" with "$vbphrase[new]"SHOWTHREAD:

replace "Post Reply" with "$vbphrase[submit_reply]"
replace
$foruminfo[title_clean]</a>>$thread[title]
with
$foruminfo[title_clean]</a> &gt; $thread[title]EVERY TEMPLATE THAT CONTAINS A <HTML>-TAG:

replace
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
with
<html xmlns="http://www.w3.org/1999/xhtml" dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">Thanks in advance! :)

tekguru
17 Jun 2008, 18:24
Loaded - good suggestions on those changes!

dartho
18 Jun 2008, 00:06
Thanks for that Keyser Soze - I've been wanting to (but putting off) doing that for a long time. Your list should make it much easier for me...

jazz_aaf
18 Jun 2008, 04:19
Thanks for the style.
You may want to check all those hardly-coded phrases in the style. There are alot of them that do not use vbulletin's phrases system.

nike.stars
18 Jun 2008, 20:59
@dartho
could you explain why after i post message / PM in opera mini the screen go white? It makes the feeling that the data is failed to sent for most of my member so it increase the chance of double / triple post :(

dartho
19 Jun 2008, 00:00
I don;t have that problem with Opera Mini on my site. Try testing via the OperaMini emulator (which I assume is using the latest version) and see of you get the same results

http://www.operamini.com/demo/?url=www.yourdomain.com (change the yourdomain bit on the end)

BeerLuver
20 Jun 2008, 12:59
Dartho I hope you don't mind this. I HAD to get this working, so I thought I would offer everyone a bandaid until Dartho gets back. I thought I would share in case anyone is stuck after moving to 3.7 today.

Okay I had to get this working, since I have already moved to 3.7 and I have mobile users ;)

According to this post: http://www.vbulletin.org/forum/showthread.php?t=177013

If you are getting this error:

Find the following templates:

Add this just before the submit button:
<input type="hidden" name="securitytoken" value="$bbuserinfo[securitytoken]" />That should at least get you by in a pinch until Dartho puts a new version up.

;)

Umm... bit confused. What's the submit button code we should look for? In some templates, seems to be multiple instances where I see submit; or is it sbutton?

dartho
20 Jun 2008, 13:10
It's already been done in this release - no need to worry about this

dartho
22 Jun 2008, 00:28
I've just put up the template edits need to hide a style form the style chooser so users can;t select it.. see here: How to hide a style from style chooser (http://www.vbulletin.org/forum/showthread.php?t=183185)

I may be able to make this into a mini-product and/or integrate it into the add-on which can customise this style

Venturing
22 Jun 2008, 10:08
Installed and looks good. Some fonts are a little large on the BlackBerry Curve, but I'm sure we'll get used to it, or end up tweaking the CSS a bit.

dartho
22 Jun 2008, 11:02
Someone else on a blackberry mentioned the same thing - edit the CSS and remove all the size declarations....

BeerLuver
24 Jun 2008, 04:57
Installed... tested on my MotoRAZR V3... looks/worked great in the built-in browser + in Opera Mini. Thanks for this excellent skin dartho :D. Got this setup for mobile devices, and the iPhone/Touch skin for those users. Very cool.

Nevets2329
26 Jun 2008, 15:30
Help! Downloaded fine, works on my phone fine, but I cannot post on my own site via phone as the password keeps getting wiped. What am I doing wrong?

Also, have one user that gets this hack as 'default' on his PC. I have had to turn it off to stop this, can anyone help?

Fireproof
26 Jun 2008, 21:25
Someone else on a blackberry mentioned the same thing - edit the CSS and remove all the size declarations....

I did and removed the size declarations as you suggested and now it works great. Nice and small, but very readable. :up:

Howell
26 Jun 2008, 21:48
Is there anyway to remove the template notice in the AdminCP??

It's showing I need to update 10 templates which obviously have been customized for this style.

I'm using Vbulletin 3.7.2

FIXED

**EDIT**

I opened the XML and did a find and replace for every instance of 3.7.1 and replaced it with 3.7.2 then re-uploaded the style overwriting the original.

**/ EDIT**

dartho
27 Jun 2008, 09:40
Help! Downloaded fine, works on my phone fine, but I cannot post on my own site via phone as the password keeps getting wiped. What am I doing wrong?

Also, have one user that gets this hack as 'default' on his PC. I have had to turn it off to stop this, can anyone help?

For a user to get this on their PC, they would have to select it as their style. In the add-on I released to go along with this, you can add a link back to the default style so users can get back to that if they select by accident/curiosity

If you have the mobile detect hack installed and this is what is forcing the user to teh mobile style, check the users useragent string and post here so I can see if it is conflicting with anything. Also if you are using the autodetect hack, it may be worth hiding the MObile style from PC users so they can;t select it by accident - this addon (http://www.vbulletin.org/forum/showthread.php?t=182692) will help

nike.stars
29 Jun 2008, 13:13
dartho, do you have any intention in the future to add the moderation tools in this style? I have a couple of my mod asking about this feature as most of my moderator prefer to access my forum via the phone :)

dartho
29 Jun 2008, 14:30
Mods can delete threads and posts. What other sorts of moderation would you want form a mobile phone?

rockylinux
29 Jun 2008, 14:41
Mods can delete threads and posts. What other sorts of moderation would you want form a mobile phone?

edit e Banned (mod CP & Admin CP)... :) thanks

EmpireZ
30 Jun 2008, 09:01
Is there a easy way to add a link to this style?
I have a tab forum like here on .org, but can't see those forums on this style, just the main page. What would be easiet or you suggest I do to view these other tab forums ?

dartho
30 Jun 2008, 09:50
You just need to create a link to "index.php?styleid=xx" where xx is the styleid number. However, if you are using this style in conjunction with the auto-detect add-on, mobile uses will be force to use this style anyway.

THere is also an add-on to this style here: http://www.vbulletin.org/forum/showthread.php?t=182692 which allows to to customise a few things in addition to including a link back to your default style and hiding the mobile style form the style chooser for your PC users.

matt wood
01 Jul 2008, 10:36
Hi, great mod, will there be a version for 3.7.2? I'm getting this error.

This file was created using a different version of vBulletin from the one you are running.

Your version: 3.7.2
File version: 3.7.1

Any quick fixes?

matt wood
01 Jul 2008, 11:44
Ignore me, all working, installed, nominated and rated 5! :) Many Thanks.

Nevets2329
03 Jul 2008, 10:33
I have had to delete as it caused too many problems.

dartho
03 Jul 2008, 11:40
That's one way to resolve things :)

TheWhite
04 Jul 2008, 09:06
OK - I think I have working properly now. Code for plugin below. Ads don;t show up all teh time and after a bunch of refreshes they go a way for a while. This is a google thing and I guess it depends on your sites content and who is advertising? Anyway - the following seems to work for me. It is set for showing ads just before the quick reply, but you can change the ad_location in the code to show them after first post by searching and replacing ad_showthread_beforeqr for ad_showthread_firstpost in the plugin code...



Get your mobile adsense PHP code - here's the code Google game me (DO NOT USE THIS - GET YOUR OWN)

<?php

$GLOBALS['google']['ad_type']='text';
$GLOBALS['google']['channel']='0000000000';
$GLOBALS['google']['client']='pub-0000000000000000';
$GLOBALS['google']['format']='mobile_single';
$GLOBALS['google']['https']=$_SERVER['HTTPS'];
$GLOBALS['google']['host']=$_SERVER['HTTP_HOST'];
$GLOBALS['google']['ip']=$_SERVER['REMOTE_ADDR'];
$GLOBALS['google']['markup']='xhtml';
$GLOBALS['google']['oe']='utf8';
$GLOBALS['google']['output']='xhtml';
$GLOBALS['google']['ref']=$_SERVER['HTTP_REFERER'];
$GLOBALS['google']['url']=$_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
$GLOBALS['google']['useragent']=$_SERVER['HTTP_USER_AGENT'];
$google_dt = time();
google_set_screen_res();

function google_append_url(&$url, $param, $value) {
$url .= '&' . $param . '=' . urlencode($value);
}

function google_append_globals(&$url, $param) {
google_append_url($url, $param, $GLOBALS['google'][$param]);
}

function google_append_color(&$url, $param) {
global $google_dt;
$color_array = split(',', $GLOBALS['google'][$param]);
google_append_url($url, $param,
$color_array[$google_dt % sizeof($color_array)]);
}

function google_set_screen_res() {
$screen_res = $_SERVER['HTTP_UA_PIXELS'];
$delimiter = 'x';
if ($screen_res == '') {
$screen_res = $_SERVER['HTTP_X_UP_DEVCAP_SCREENPIXELS'];
$delimiter = ',';
}
$res_array = explode($delimiter, $screen_res);
if (sizeof($res_array) == 2) {
$GLOBALS['google']['u_w'] = $res_array[0];
$GLOBALS['google']['u_h'] = $res_array[1];
}
}

function google_get_ad_url() {
$google_ad_url = 'http://pagead2.googlesyndication.com/pagead/ads?';
$google_scheme = ($GLOBALS['google']['https'] == 'on')
? 'https://' : 'http://';
foreach ($GLOBALS['google'] as $param => $value) {
if ($param == 'client') {
google_append_url($google_ad_url, $param,
'ca-mb-' . $GLOBALS['google'][$param]);
} else if (strpos($param, 'color_') === 0) {
google_append_color($google_ad_url, $param);
} else if ((strpos($param, 'host') === 0)
|| (strpos($param, 'url') === 0)) {
google_append_url($google_ad_url, $param,
$google_scheme . $GLOBALS['google'][$param]);
} else {
google_append_globals($google_ad_url, $param);
}
}
google_append_url($google_ad_url, 'dt',
round(1000 * array_sum(explode(' ', microtime()))));
return $google_ad_url;
}

$google_ad_handle = @fopen(google_get_ad_url(), 'r');
if ($google_ad_handle) {
while (!feof($google_ad_handle)) {
echo fread($google_ad_handle, 8192);
}
fclose($google_ad_handle);
}

?>


I had to move al the functions to the top of the code block for it to work in a plug in I created a called "Google Adsense Mobile" on the showthread_start hook. Here is the working plugin code:

if ($styleid == xx) {
function google_append_url(&$url, $param, $value) {
$url .= '&' . $param . '=' . urlencode($value);
}

function google_append_globals(&$url, $param) {
google_append_url($url, $param, $GLOBALS['google'][$param]);
}

function google_append_color(&$url, $param) {
global $google_dt;
$color_array = split(',', $GLOBALS['google'][$param]);
google_append_url($url, $param,
$color_array[$google_dt % sizeof($color_array)]);
}

function google_set_screen_res() {
$screen_res = $_SERVER['HTTP_UA_PIXELS'];
$delimiter = 'x';
if ($screen_res == '') {
$screen_res = $_SERVER['HTTP_X_UP_DEVCAP_SCREENPIXELS'];
$delimiter = ',';
}
$res_array = explode($delimiter, $screen_res);
if (sizeof($res_array) == 2) {
$GLOBALS['google']['u_w'] = $res_array[0];
$GLOBALS['google']['u_h'] = $res_array[1];
}
}

function google_get_ad_url() {
$google_ad_url = 'http://pagead2.googlesyndication.com/pagead/ads?';
$google_scheme = ($GLOBALS['google']['https'] == 'on')
? 'https://' : 'http://';
foreach ($GLOBALS['google'] as $param => $value) {
if ($param == 'client') {
google_append_url($google_ad_url, $param,
'ca-mb-' . $GLOBALS['google'][$param]);
} else if (strpos($param, 'color_') === 0) {
google_append_color($google_ad_url, $param);
} else if ((strpos($param, 'host') === 0)
|| (strpos($param, 'url') === 0)) {
google_append_url($google_ad_url, $param,
$google_scheme . $GLOBALS['google'][$param]);
} else {
google_append_globals($google_ad_url, $param);
}
}
google_append_url($google_ad_url, 'dt',
round(1000 * array_sum(explode(' ', microtime()))));
return $google_ad_url;
}

$GLOBALS['google']['ad_type']='text';
$GLOBALS['google']['channel']='0000000000';
$GLOBALS['google']['client']='pub-0000000000000000';
$GLOBALS['google']['format']='mobile_single';
$GLOBALS['google']['https']=$_SERVER['HTTPS'];
$GLOBALS['google']['host']=$_SERVER['HTTP_HOST'];
$GLOBALS['google']['ip']=$_SERVER['REMOTE_ADDR'];
$GLOBALS['google']['markup']='xhtml';
$GLOBALS['google']['oe']='utf8';
$GLOBALS['google']['output']='xhtml';
$GLOBALS['google']['ref']=$_SERVER['HTTP_REFERER'];
$GLOBALS['google']['url']=$_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
$GLOBALS['google']['useragent']=$_SERVER['HTTP_USER_AGENT'];
$google_dt = time();
google_set_screen_res();

$find='"';
$replace="'";
$googlemad = '';

$google_ad_handle = @fopen(google_get_ad_url(), 'r');
if ($google_ad_handle) {
while (!feof($google_ad_handle)) {
$googlemad .= fread($google_ad_handle, 8192);
}
fclose($google_ad_handle);
}
$vbulletin->templatecache['ad_showthread_beforeqr'] = str_replace($find,$replace,$googlemad);

}


You'll see I wrapped the google code in a conditional if ($styleid == xx) { ... } where xx is the styleid of my mobile style - you will need to change this and removed the opening and closing php tags.

The other changes (after moving the functions to the top) were:
1. replace

$google_dt = time();
google_set_screen_res();


with

$google_dt = time();
google_set_screen_res();

$find='"';
$replace="'";
$googlemad = '';



2. replace
echo fread($google_ad_handle, 8192);
}
fclose($google_ad_handle);
}

with

$googlemad .= fread($google_ad_handle, 8192);
}
fclose($google_ad_handle);
}

$vbulletin->templatecache['ad_showthread_beforeqr'] = str_replace($find,$replace,$googlemad);


That's about it. You could modify and or duplicate this to work with other ad_locations. Current defined ad_locations in vBulletin 3.7 (and this style) and the likely best hook location for these ads are (i'm not so sure about the ones in blue - they should work there, but there may be a more efficient place to put them. Feedback welcomed!):

ad_footer_start - global_start
ad_footer_end - global_start
ad_forumdisplay_afterthreads - forum_display_start
ad_forumhome_afterforums - forum_home_start
ad_header_end - global_start
ad_header_logo - global_start
ad_navbar_below - global_start
ad_showthread_beforeqr - showthread_start
ad_showthread_firstpost - showthread_start

Hope this helps!

i really don't understand what to do after getting my adsense code, i'm totally lost can you please ad a 4Dummies guide?

Regards

dartho
04 Jul 2008, 09:52
@The WHite - PM me your google mobile adsense code, the styleid number of your mobile style, where you want the ads to show (you can choose from one of these: ad_forumdisplay_afterthreads, ad_forumhome_afterforums, ad_showthread_beforeqr, ad_showthread_firstpost) and over the weekend if/when I get a bit of time I'll turn it into a plugin and send it back to you.

HOWEVER - no warranties, guaranties, support or any such thing comes with the code I send back to you.

TheWhite
04 Jul 2008, 09:57
pm sent!!

PS. I'd like to place it where it should have the most possibilities of getting clicked maybe after the first thread or where you think it's better.

God Bless

TheWhite
05 Jul 2008, 08:00
I found a little bug, when replying if you type in too many words you won't be able to see the text anymore because it will no longer scroll down in the window and another thing since the admins and mods are unable to edit,ban or anything else is it possibile to remove the cancel button [X]?

Thanks for all of the help

Note to all: The coder dartho is a very helpful person =)

Artangel
05 Jul 2008, 15:18
is there a way just to show up the smiley?

yes.. just look at the Replace varialble.. and change the codes.. :)

i made some changes in my mobile style.. put an icons and smiley..


btw, thanks to the author for this mobile style.. :)

TheWhite
05 Jul 2008, 16:57
yes.. just look at the Replace varialble.. and change the codes.. :)

i made some changes in my mobile style.. put an icons and smiley..


btw, thanks to the author for this mobile style.. :)

can you be more specific?

dartho
05 Jul 2008, 23:24
I found a little bug, when replying if you type in too many words you won't be able to see the text anymore because it will no longer scroll down in the window

Not sure what you mean here? Is this quick reply or reply - both use a textarea anyway so it could be your browser limitations...

and another thing since the admins and mods are unable to edit,ban or anything else is it possibile to remove the cancel button [X]?


Moderators (or users/groups with the correct permissions) can edit posts, delete posts and delete threads. You can edit the postbit template to remove the delete thread link ([X]) if you don't require it

TheWhite
06 Jul 2008, 06:08
How can i just add the following information in the footer?


Threads: XX,XXX, Posts: XX,XXX, Members: XX,XXX
Welcome to our newest member, Rocky

Regards

dartho
06 Jul 2008, 12:00
Edit the FORUMHOME template and remove the bits you don't want...

TheWhite
07 Jul 2008, 06:00
ok, Is there a way to activate just the smileys without the rest of the images?

Regards

dartho
07 Jul 2008, 06:42
not with out editing vBulletins source files I don;t think ...

tekguru
07 Jul 2008, 07:01
Is this going to be updated for 3.7.2 compatability?

dartho
07 Jul 2008, 07:22
I haven't upgraded my sites yet. Are there any issues between 3.7.1 and 3.7.2 that I need to be aware of you think?

tekguru
07 Jul 2008, 07:55
There were quite a lot of changed needed to the style I use (Red Carbon) so I think it likely you'll need to take at least some of them into consideration. 10 templates are listed as requiring reversion.

dartho
07 Jul 2008, 08:03
A full style would need to be updated, but due to the stripped back nature of this style, template changes will be unlikely to need to be made to make it compatible with 3.7.2.

tekguru
07 Jul 2008, 16:39
Fair enough I'll just resave the templates it is complaining about then!

NAZIA
08 Jul 2008, 12:21
Is default template will automatically divert to this when user is visiting the site via mobile?
Any idea about this...