Posted: Fri Apr 25, 2014 10:12 Post subject: Hello
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?
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.
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 :-
Joined: 14 Jan 2009 Posts: 406 Location: AB, Canada
Posted: Mon Sep 14, 2015 7:41 Post subject:
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
# 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=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.
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.
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
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.
Joined: 18 Mar 2014 Posts: 12889 Location: Netherlands
Posted: Thu Nov 24, 2022 8:16 Post subject:
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.
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.