My_Page

Post new topic   Reply to topic    DD-WRT Forum Index -> Advanced Networking
Goto page Previous  1, 2, 3 ... , 24, 25, 26  Next
Author Message
ventura8
DD-WRT Novice


Joined: 29 Jan 2012
Posts: 34

PostPosted: Fri Apr 25, 2014 10:12    Post subject: Hello Reply with quote
I have an AC66U with kongmod 23900M. my page shows like this



it looks like my page can not acces mypage_english.js. I have it symlinked to /tmp/www
also it looks like all the command that are like ../somescript.sh do not work
What can i do to display mypages correctly?
Sponsor
Geoff42
DD-WRT Novice


Joined: 24 Apr 2014
Posts: 9

PostPosted: Thu May 08, 2014 8:15    Post subject: Reply with quote
It appears that it is looking for some of the support files in directories which are in a sub-directory "user". A quick fix to this is to put in a link for "user" back to the main directory :-

Code:
cd /opt/www
ln -s . user


Thus it can now find /opt/www/user/images, even though you have not moved images. This seems to fix a number of problems.

Geoff
Geoff42
DD-WRT Novice


Joined: 24 Apr 2014
Posts: 9

PostPosted: Mon May 12, 2014 15:06    Post subject: Reply with quote
While installing Mypages, it seemed to me that the web page was set too narrow, so that some of the information was hidden by the help box. With help from the Firefox Web Developer Tools I tracked down the settings to a style sheet style/common.css. It is a bit tricky to change this as it seems to be buried deep in /etc/www, but I was able to save the information into a file and then edit out all of the settings apart from where various widths are being set in "ems". This has been saved to /opt/www/style/common.css. The file /opt/www/style/mypage.css can then be edited to add as the first line :-
Code:
@import url(./common.css);

It is then possible to adjust the widths in common.css. I have added 20ems to some of the widths and this seems to make the information easier to read. My common.css looks like :-
Code:
#wrapper { width:92.464em; }
#header { width:92.464em; }
#statusInfo { width:32.609em; }
#menu { width:92.464em; }
#menuSub { width:92.283em; }
#main #contents { width:72.536em; }
#main #contentsInfo { width:90.471em; }
#main #contentsInfo div.col2l { width:44.774em; }
#main #contentsInfo div.col2r { width:44.774em; }
.setting .label { width:18.931em; }
fieldset .setting .label { width:18.116em; }
.setting .default { width:17em; }
#help { width:17.210em; }
.message { max-width:92.464em; }
.meter { width:14.49em; }


Geoff
m00nman
DD-WRT User


Joined: 14 Jan 2009
Posts: 406
Location: AB, Canada

PostPosted: Mon Sep 14, 2015 7:41    Post subject: Reply with quote
Seems like MyPage from OTRW2 works on latest Kong's build 27775. on ARM based router (R6300v2)

Nothing else worked.
What I did was just modify OTRW2 install script.
The script can be downloaded in the attachment.

To install first make sure your USB storage is mounted as /opt
under Service -> USB

SSH/Telnet in and execute
Code:
cd /opt
# Gets the attachment at the bottom of this post
wget http://www.dd-wrt.com/phpBB2/download.php?id=33240
mv download.php?id\=33240 installmypage.sh
chmod +x installmypage.sh
sh ./installmypage.sh


Now go back to Services -> USB
and Put this in "Run-on-mount Script Name"
Code:
/opt/etc/init.d/S99mypage sh

_________________

Nethear R6300 v2 - Latest Kong dd-wrt always
Linksys E3000 - Latest dd-wrt always
Asus RT-N56U - OpenWRT trunk
NiceGreenNachos
DD-WRT Novice


Joined: 05 Mar 2017
Posts: 17

PostPosted: Wed May 10, 2017 9:52    Post subject: Reply with quote
Is this still active, or is it obsolete? m00nman's script needs updating, is there anyone working on this or what?
NiceGreenNachos
DD-WRT Novice


Joined: 05 Mar 2017
Posts: 17

PostPosted: Wed May 10, 2017 12:43    Post subject: Reply with quote
Here I did a script based on a few comments.

First I took this comment and worked with it.
https://www.dd-wrt.com/phpBB2/viewtopic.php?p=683674#683674

I even scripted the edits for #!/bin/sh .

I scripted the fix for opkg from this comment.
https://www.dd-wrt.com/phpBB2/viewtopic.php?p=723014#723014


I also scripted what this guy said to fix the narrow web page.
I have yet to play with the sizes myself.
https://www.dd-wrt.com/phpBB2/viewtopic.php?p=895588#895588

I even added what this guy said, even though I was not having that problem.
https://www.dd-wrt.com/phpBB2/viewtopic.php?p=894982#894982

Code:

#!/bin/sh

# Based on this comment
# https://www.dd-wrt.com/phpBB2/viewtopic.php?p=683674#683674
rm -rf /tmp/www
rm -rf /opt/www/*
nvram unset mypage_scripts
nvram commit

mkdir -p /opt/www/
cd /opt/www/
wget http://www.dd-wrt.com/phpBB2/files/mypage_working_v172_462.tar
tar -xvf mypage_working_v172_462.tar -C /opt/www/
rm -rf /opt/www/mypage_working_v172_462.tar
rm -rf /opt/www/mypage_working_v17.2.1.tar
# These lines don't run for me
#dos2unix mp* my* w*
#dos2unix setup/m* setup/t* setup/lang/* setup/libs/* js/* libs/* style/*
chmod -R 644 /opt/www/*
chmod -R 755 /opt/www/*.sh /opt/www/*.asp /opt/www/libs/*.sh /opt/www/js/*.js /opt/www/wrt*
chmod -R 755 /opt/www/setup/*.sh /opt/www/setup/libs/*.sh /opt/www/setup/lang/*.sh
chown root.root *
ln -s /opt/www /tmp/www
cp S85wrtbwmon /opt/etc/init.d/S85wrtbwmon
chmod 755 /opt/etc/init.d/S85wrtbwmon
ls -l /opt/etc/init.d/S85wrtbwmon
sed -i 's/#\/bin\/sh/#!\/bin\/sh/g' /opt/www/mp1.sh
sed -i 's/#\/bin\/sh/#!\/bin\/sh/g' /opt/www/mp2.sh
sed -i 's/#\/bin\/sh/#!\/bin\/sh/g' /opt/www/mp3.sh
sed -i 's/#\/bin\/sh/#!\/bin\/sh/g'/opt/www/mp4.sh
sed -i 's/#\/bin\/sh/#!\/bin\/sh/g' /opt/www/mp5.sh
sed -i 's/#\/bin\/sh/#!\/bin\/sh/g' /opt/www/mp6.sh
sed -i 's/#\/bin\/sh/#!\/bin\/sh/g' /opt/www/mp7.sh
sed -i 's/#\/bin\/sh/#!\/bin\/sh/g'/opt/www/mp8.sh
sed -i 's/#\/bin\/sh/#!\/bin\/sh/g' /opt/www/mp9.sh
sed -i 's/#\/bin\/sh/#!\/bin\/sh/g' /opt/www/mp10.sh
sed -i 's/#\/bin\/sh/#!\/bin\/sh/g' /opt/www/mp11.sh
sed -i 's/#\/bin\/sh/#!\/bin\/sh/g' /opt/www/mp12.sh
sed -i 's/#\/bin\/sh/#!\/bin\/sh/g' /opt/www/mp13.sh
sed -i 's/#\/bin\/sh/#!\/bin\/sh/g' /opt/www/mp14.sh
sed -i 's/#\/bin\/sh/#!\/bin\/sh/g' /opt/www/S85wrtbwmon
cp /opt/www/S85wrtbwmon  /opt/etc/init.d/S85wrtbwmon

# Based on this comment
# https://www.dd-wrt.com/phpBB2/viewtopic.php?p=723014#723014
sed -i 's/ipkg/opkg/g' /opt/www/mp8.sh
sed -i 's/ipkg/opkg/g'/opt/www/libs/mypage_libweb.sh

#  This must be done in this order or it won't work
nvram set mypage_scripts="/opt/www/mypage1.sh /opt/www/mypage2.sh /opt/www/mypage3.sh /opt/www/mypage4.sh /opt/www/mypage5.sh /opt/www/mypage6.sh /opt/www/mypage7.sh /opt/www/mypage8.sh /opt/www/mypage9.sh /opt/www/mypage10.sh /opt/www/mypage11.sh /opt/www/mypage12.sh"
nvram commit
cd /opt/www/setup
/bin/sh mypage_setup.sh /opt/www y y y y y y y y y

# Based on this comment
# https://www.dd-wrt.com/phpBB2/viewtopic.php?p=729042#729042
echo "#wrapper { width:92.464em; }
#header { width:92.464em; }
#statusInfo { width:32.609em; }
#menu { width:92.464em; }
#menuSub { width:92.283em; }
#main #contents { width:72.536em; }
#main #contentsInfo { width:90.471em; }
#main #contentsInfo div.col2l { width:44.774em; }
#main #contentsInfo div.col2r { width:44.774em; }
.setting .label { width:18.931em; }
fieldset .setting .label { width:18.116em; }
.setting .default { width:17em; }
#help { width:17.210em; }
.message { max-width:92.464em; }
.meter { width:14.49em; }" > /opt/www/style/common.css
sed -i '1s/^/\@import url(.\/common.css);\n/' /opt/www/style/mypage.css

# Based on this comment
# https://www.dd-wrt.com/phpBB2/viewtopic.php?p=894982#894982
cd /opt/www
ln -s . user

reboot

# Add to Start-up Script or input in router gui startup
#Code:
#sleep 5
#/opt/www/mypageup.sh /opt/www 10

#Additional Cron Jobs (to reset counter at begining of month):
#Code:
#0 0 1 * * root rm /tmp/www/usage.db
#0 0 1 * * root rm /tmp/usage.db

#rm -rf /opt/etc/init.d/S85wrtbwmon
# because I added everything from S85wrtbwmon to my startup script to get rid of SSH login error

done




There are three things that are not quite right.

1) I think something is breaking the tab icon that should be DD-WRT, because it is missing.
See this image as an example: https://i.imgur.com/2Qlt9ht.png
The forum tab to the right has the correct tab icon.

2) This guy is right, I think the "My Page" tab should be to the right of the Stats tab as it is when I click on it. See the image here: https://i.imgur.com/7mZVIZ6.png
https://www.dd-wrt.com/phpBB2/viewtopic.php?p=683858#683858


3) The blue color scheme of the Router GUI Style seems to be light on the"My Page" than else where. This may be due to me having Dark Styles enabled and My Page still being full white.
NiceGreenNachos
DD-WRT Novice


Joined: 05 Mar 2017
Posts: 17

PostPosted: Wed May 10, 2017 12:50    Post subject: Reply with quote
Someone could revise the wiki here
https://www.dd-wrt.com/wiki/index.php/MyPage

and just edit the scripts from that download here
http://www.dd-wrt.com/phpBB2/files/mypage_working_v172_462.tar
so to make the whole thing far easier.

That is if this is even for the effort.

It seem as though this may need to be retired.
skuppej
DD-WRT Novice


Joined: 08 Oct 2012
Posts: 2

PostPosted: Mon Aug 07, 2017 3:33    Post subject: Reply with quote
Thanks for combining everything that has been mentioned, NiceGreenNachos.

Here's how my page looks on the latest BS beta for my Linksys WRT1900ACv2:



But when I click on "My Page" I get a blank page with this special char:



Ideas?
Brianwuz
DD-WRT User


Joined: 10 Feb 2010
Posts: 104

PostPosted: Sun Feb 04, 2018 12:00    Post subject: Reply with quote
kingsmill wrote:

2/ Edit all /opt/www/mp*.sh files and ensure that the first line of the file is #!/bin/sh. If not then add #!/bin/sh as the first line of the file.

These changes should resolve the MyPage blank screen.

Geoff..


Wow, I have been troubleshooting this for 8 hours and it's the scripts not having a #!/bin/sh at the top.

Thanks Kinsmill

Brian
akra
DD-WRT Novice


Joined: 12 Feb 2022
Posts: 8

PostPosted: Fri Jun 10, 2022 16:03    Post subject: Reply with quote
Soo is anyone still on this? It's been a while since the last post at least.

I managed to get it to work reading through this post, but for my own custom page I need to get some user input into the scripts.

Previous answers to this seemed to be dismissive, but that was a few years ago. Is there any way to accomplish this nowadays?
kernel-panic69
DD-WRT Guru


Joined: 08 May 2018
Posts: 14125
Location: Texas, USA

PostPosted: Fri Jun 10, 2022 17:16    Post subject: Reply with quote
I presume you also found the following threads in your reading:

https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=79941
https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=156013

Keep in mind that not much of the documentation in the wiki and in the forum regarding MyPage (This page was last modified 14:22, 4 April 2011) and OTRW (This page was last modified 22:27, 17 December 2017) is updated or relevant, especially considering many webUI enhancements since 9/11/2021 and the shift to Entware.

I have not dived in to see which recent version of MyPage works or anything, and I do not know which pieces of the puzzle were already incorporated into the current webUI or not. I have also not seen much presence of Dark_Shadow or any of the other folks involved in developing this collection of scripts on the forum.

_________________
"Life is but a fleeting moment, a vapor that vanishes quickly; All is vanity"
Contribute To DD-WRT
Pogo - A minimal level of ability is expected and needed...
DD-WRT Releases 2023 (PolitePol)
DD-WRT Releases 2023 (RSS Everything)

----------------------
Linux User #377467 counter.li.org / linuxcounter.net
akra
DD-WRT Novice


Joined: 12 Feb 2022
Posts: 8

PostPosted: Sun Jun 26, 2022 14:44    Post subject: Reply with quote
kernel-panic69 wrote:
I presume you also found the following threads in your reading:

https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=79941
https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=156013

Keep in mind that not much of the documentation in the wiki and in the forum regarding MyPage (This page was last modified 14:22, 4 April 2011) and OTRW (This page was last modified 22:27, 17 December 2017) is updated or relevant, especially considering many webUI enhancements since 9/11/2021 and the shift to Entware.

I have not dived in to see which recent version of MyPage works or anything, and I do not know which pieces of the puzzle were already incorporated into the current webUI or not. I have also not seen much presence of Dark_Shadow or any of the other folks involved in developing this collection of scripts on the forum.


Thank you very much for your information.

Do you or does anyone know if the MyPage functionality itself is still being continued?

I would have a functionality request, in that I need the MyPage.asp also be able to handle additional parameters, to at least be able to send GET requests to pages exposed by MyPage.

It would be great if anyone could show me if this is possible. I will otherwise make a thread in the General Questions section of this forum.
the-joker
DD-WRT Developer/Maintainer


Joined: 31 Jul 2021
Posts: 2146
Location: All over YOUR webs

PostPosted: Sun Jun 26, 2022 14:49    Post subject: Reply with quote
No one is working on that MyPage other work takes precedence over features that only benefit 1 user.

I suppose you can include JavaScript to achieve all you want.

If you look at most of the asp pages source code it will show you how to add your own JavaScript, and how to use it in a semi round about way.

See for instance https://github.com/mirror/dd-wrt/blob/master/src/router/kromo/dd-wrt/Reboot.asp but pick almost any page.

No other threads necessary, if you cant do it with JavaScript and the examples our other existing pages use, then no other threads will help you Wink

_________________
Saving your retinas from the burn!🔥
DD-WRT Inspired themes for routers
DD-WRT Inspired themes for the phpBB Forum
DD-WRT Inspired themes for the SVN Trac & FTP site
Join in for a chat @ #style_it_themes_public:matrix.org or #style_it_themes:discord

DD-WRT UI Themes Bug Reporting and Discussion thread

Router: ANus RT-AC68U E1 (recognized as C1)
kernel-panic69
DD-WRT Guru


Joined: 08 May 2018
Posts: 14125
Location: Texas, USA

PostPosted: Sun Jun 26, 2022 18:06    Post subject: Reply with quote
Well, this one is up to the original author - otherwise, definitely a back burner for me. Much more important things to work on.
_________________
"Life is but a fleeting moment, a vapor that vanishes quickly; All is vanity"
Contribute To DD-WRT
Pogo - A minimal level of ability is expected and needed...
DD-WRT Releases 2023 (PolitePol)
DD-WRT Releases 2023 (RSS Everything)

----------------------
Linux User #377467 counter.li.org / linuxcounter.net
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12835
Location: Netherlands

PostPosted: Thu Nov 24, 2022 8:16    Post subject: Reply with quote
I have been looking into it and also moved this thread to the more appropriate Advanced Networking forum as it is of interest to not only Broadcom users.

I have attached a revised working zip file which works with build 50927 and higher.
But it probably needs more work but at least it is working for now.

Install according to the wiki: https://wiki.dd-wrt.com/wiki/index.php/MyPage

Some brake down, if you set the nvram parameter mypage_scripts DDWRT will show the MyPage page under Status.
The scripts you add to the mypage_scripts nvram parameter are executed when the page is made, so those scripts actually place HTML code on the webpage.

I have made a small patch (pending) to communicate by URL parameters e.g. http://192.168.1.1/MyPage.asp?12&firstparam&secondparam but there must be already something in place to do that I think.

_________________
Routers:Netgear R7000, R6400v1, R6400v2, EA6900 (XvortexCFE), E2000, E1200v1, WRT54GS v1.
Install guide R6400v2, R6700v3,XR300:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
Install guide R7800/XR500: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Forum Guide Lines (important read):https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087


Last edited by egc on Mon Jul 24, 2023 10:05; edited 2 times in total
Goto page Previous  1, 2, 3 ... , 24, 25, 26  Next Display posts from previous:    Page 25 of 26
Post new topic   Reply to topic    DD-WRT Forum Index -> Advanced Networking All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum