Mobile MyBB 1.8/1.6
#51
Rickey,

I'm wondering how I can edit the items and/or labels in the "Options" menu for the mobile template.  Is it possible?  Thank you!
Reply
#52
(08-13-2017, 07:04 PM)mocad Wrote: Rickey,

I'm wondering how I can edit the items and/or labels in the "Options" menu for the mobile template.  Is it possible?  Thank you!

Hi mocad,

It is possible; while, you have to do this edit manually from administration panel.  The procedure is:
MyBB adminstration panel -> Templates & Styles -> Templates -> Mobile MyBB 1.8 Templates -> Header Templates -> header

And then update the header template code according to what you want.

Remember to backup your updating, because when I have new version, you update the module, you will lost what you edit.  So backup what you do.

Any question, feel free to ask me.  Good luck.

Rickey
Reply
#53
all it shows is the furums? None of the other content
Reply
#54
(08-19-2017, 05:59 AM)outlaw16151 Wrote: all it shows is the furums? None of the other content

Hi outlaw16151,

You are right, this module is not finished yet.

My next development would be search and/or private message.  If you have other suggestion, please let me know.

Rickey
Reply
#55
Hey Rickey,
Thanks for supporting the plugin for so long!

I hopped over to the GitHub grabbed the AMP version of the plugin and it works very nicely!

One thing I want to do is cause the plugin to only activate when a subdomain (amp.domain.com) is used. I have already removed the user agents to prevent it from activating automatically for users, but I don't see an easy way to force the plugin only when on a specific subdomain.
Currently I forward users who visit the amp subdomain back to the site with the "?m-redirection=mobile" but that doesn't work to get users to the mobile version from search (when user agent detection is disabled).

Basically I expect to have a responsive primary theme which is full featured and works moderately well and a slimmed down AMP compliant version that kicks in when a user comes from a Google Search or otherwise just needs the fastest possible buttery smooth experience. I only want users to see the AMP version if they hit the amp subdomain.

Ideally this would also update the injected amphtml <link> to reference the amp subdomain.
https://www.ampproject.org/docs/tutorial..._discovery

Let me know if you think this is a feasible adjustment that you can do and, if you have it, please PM me your Paypal or Google Wallet or whatever trendy new payment method exists that I haven't heard of yet.

Thanks
Reply
#56
(08-21-2017, 03:50 PM)HMHackMaster Wrote: Hey Rickey,
Thanks for supporting the plugin for so long!

I hopped over to the GitHub grabbed the AMP version of the plugin and it works very nicely!

One thing I want to do is cause the plugin to only activate when a subdomain (amp.domain.com) is used. I have already removed the user agents to prevent it from activating automatically for users, but I don't see an easy way to force the plugin only when on a specific subdomain.
Currently I forward users who visit the amp subdomain back to the site with the "?m-redirection=mobile" but that doesn't work to get users to the mobile version from search (when user agent detection is disabled).

Basically I expect to have a responsive primary theme which is full featured and works moderately well and a slimmed down AMP compliant version that kicks in when a user comes from a Google Search or otherwise just needs the fastest possible buttery smooth experience. I only want users to see the AMP version if they hit the amp subdomain.

Ideally this would also update the injected amphtml <link> to reference the amp subdomain.
https://www.ampproject.org/docs/tutorial..._discovery

Let me know if you think this is a feasible adjustment that you can do and, if you have it, please PM me your Paypal or Google Wallet or whatever trendy new payment method exists that I haven't heard of yet.

Thanks

Hi HMHackMaster,

Please correct me if I am wrong, my understanding of what you want is: 1. block my current User Agent detection and redirection entrance; 2. for each URL, if there is "mmybb18p=1" inside, for example: "http://yourdomain.com/index.php?mmybb18p=1", end users should get the AMP theme; otherwise, end users get the default theme.

My detail updating would be:
0. Add an ON/OFF variable in my configuration file.  If the variable is ON (default value), the User Agent detection and redirection entrance is activated; if OFF, the entrance you want will be activated.

Regarding my current entrance, the code scenarios will not be changed.

Regarding the entrance you want, the code scenarios would be:
1. For every web page, if there is no "mmybb18p=1" inside URL, I should display the default theme.

For the "amphtml" link, I will append "mmybb18p=1".  For example, for URL "https://yourdomain.com/", the amphtml link should be: "<link rel="amphtml" href="https://yourdomain.com/?mmybb18p=1" />" .

2. For every web page, if there is "mmybb18p=1" inside URL, I should display the AMP theme.


For the "canonical" link,  I will remove "mmybb18p=1".  For example, for URL "https://yourdomain.com/?mmybb18p=1", the canonical link should be: "<link rel="canonical" href="https://yourdomain.com/" />".

3. For each AMP theme web page content, I should append "mmybb18p=1" at the ending of each URL. (So, when end users click any links within this page, the new pages will still be in AMP theme.)

4. "amp.yourdomain.com" will be forward to "https://yourdomain.com/?mmybb18p=1" automatically. (My module will not do any action here, you will configure the sub-domain forwarding by yourself.)

5. For the Quick Theme Switcher (at the bottom right corner of each MyBB web page), I will try to disable this switching to prevent end users get into AMP theme manually. (This is one thing I am NOT sure right now, I will do testing to verify if my plan is feasible.)


Any question, please let me know.

Rickey
Reply
#57
My goal would be for the plugin to detect if there is a specified (ideally user-configurable) subdomain attached to the Message Board's domain and then present the AMP theme only to those viewers.

For example:
community.mybb.com IN A 104.25.195.202
amp.community.mybb.com. IN CNAME community.mybb.com


so the plugin would need to look for 'amp.community.mybb.com' (a user-configurable hostname) and only show the theme to those users.

This would be in addition to not automatically showing the AMP version to mobile viewers (though since other board admins would not necessarily like this option, I would think this should be a user-configurable setting too).

The issue with doing a redirect from "https://amp.community.mybb.com" to "https://community.mybb.com/?mmybb18p=1" is that if a user (from Google search or a link, for example) tries to visit "https://amp.community.mybb.com/showthread.php?tid=22291" the redirect would likely strip out the 'showthread.php' part.
Redirects are also not ideal from end user perspective and search engines.

I'll keep thinking my way through this a bit more...
Reply
#58
Ok, so essentially what I am asking is to, instead of using a cookie, to look at the SERVER_NAME and, if it matches what is set in the config, present the AMP version. If not then just bail out.

PHP Code:
$_SERVER['SERVER_NAME']; 

Honestly much easier than I feared.
Reply
#59
(08-28-2017, 12:26 AM)HMHackMaster Wrote: Ok, so essentially what I am asking is to, instead of using a cookie, to look at the SERVER_NAME and, if it matches what is set in the config, present the AMP version. If not then just bail out.

PHP Code:
$_SERVER['SERVER_NAME']; 

Honestly much easier than I feared.

Hi HMHackMaster,

Please correct me if I am wrong.  My module could be installed at "amp.yourdomain.com"; while, since my module is only a plugin, the MyBB should also be installed in "amp.yourdomain.com".  However, another copy of MyBB should be installed in "yourdomain.com" (to support the classical/default theme).  So two copies of MyBB control one copy of database -- this is what I concern, I do not think this (two MyBB, one database) is feasible.

Rickey
Reply
#60
Pls, help me! I install last version MyBB and install last version plugin, after it i have this (in postgresql in table "mybb_themes" there is row with tid = 3 and name = "Mobile MyBB 1.8"). I think in sql query need correct as < SELECT tid FROM mybb_themes WHERE name='"Mobile MyBB 1.8"' LIMIT 1> maybe. My error in my site http://138.68.82.220/f/:

MyBB has experienced an internal SQL error and cannot continue.

SQL Error:
0 - ERROR: column "Mobile MyBB 1.8" does not exist LINE 1: SELECT tid FROM mybb_themes WHERE name="Mobile MyBB 1.8" LIM... ^
Query:
SELECT tid FROM mybb_themes WHERE name="Mobile MyBB 1.8" LIMIT 1
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)