NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Add-ons (3rd party plugins, utilities and skins) Old Stuff (Legacy) Community Skin v
« Previous 1 2 3 4 5 … 10 Next »
[DEV] change arbritary values in an .xml file?

 
  • 0 Vote(s) - 0 Average
[DEV] change arbritary values in an .xml file?
johnsonx42
Offline

Posting Freak

Posts: 7,298
Threads: 189
Joined: Sep 2008
#1
2009-09-13, 03:50 AM
McBainUK:

In the SkinPluginConfig.xml, I know how to use the <xmltextsizeedit> function tp increase or decrease a numerical value in an XML file - as used originally for the Text Size, which I also hijacked for the 'TV Guide Rows' selection method.

Such as:
Code:
<xmltextsizeedit>
          <name>skin.xml</name>
          <target>%SKINROOT%\TV Guide\skin.xml</target>
          <node>/settings/TextStyles/TextStyle[@name='ListingStyle']/@size</node>
          <default>11</default>
        </xmltextsizeedit>

This function takes a starting value and then modifies it by +1, -1, etc. which come from the corresponding folder names under the Resources folder. (I know you know all that, you wrote the code, I just want to make sure we're on the same page)

What I want to do now is change certain values in an .xml file, but use absolute values rather than relative numeric values. For example, I want to be able to set a certain value in an XML file to True or False.

Now as I've been typing this, I had a look at the file 'EditableSkinItemsList.cs'. I see there is a function called <xmledit> which probably does what I want, but I see no example of it's use in SkinPluginConfig.xml. Can you confirm this function is in fact what I want, and give me a usage example?

What I ultimately wish to do is to write a replacement for the existing Settings screen in PVRX2. Sub said he is getting rid of this screen in 1.5, as he's decided he's never going to get around to implementing it the way he planned. There are a variety of user-interface related settings that would be useful to change from the Skin Plugin rather than have to go in to config.exe or hand edit in config.xml.
server: NextPVR 5.0.7/Win10 2004/64-bit/AMD A6-7400k/hvr-2250 & hvr-1250/Winegard Flatwave antenna/Schedules Direct
main client: NextPVR 5.0.7 Desktop Client; LG 50UH5500 WebOS 3.0 TV
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 53,102
Threads: 957
Joined: May 2006
#2
2009-09-13, 04:14 AM
johnsonx42 Wrote:What I ultimately wish to do is to write a replacement for the existing Settings screen in PVRX2. Sub said he is getting rid of this screen in 1.5, as he's decided he's never going to get around to implementing it the way he planned. There are a variety of user-interface related settings that would be useful to change from the Skin Plugin rather than have to go in to config.exe or hand edit in config.xml.

Please make sure if you do this, that you are Vista aware, PVRx2 doesn't by default have permissions to edit config.xml but it can write the Virtual copy that messes a lot of people up.

Martin
johnsonx42
Offline

Posting Freak

Posts: 7,298
Threads: 189
Joined: Sep 2008
#3
2009-09-13, 06:11 AM
mvallevand Wrote:Please make sure if you do this, that you are Vista aware, PVRx2 doesn't by default have permissions to edit config.xml but it can write the Virtual copy that messes a lot of people up.

Interesting... I was operating under the assumption that since the CS4 Skin Plugin is able to write to various XML files under the GBPVR/Skin2 directory, that it would also be able to write to config.xml without issue. Those who know more about how the Skin Plugin works will have to comment.
server: NextPVR 5.0.7/Win10 2004/64-bit/AMD A6-7400k/hvr-2250 & hvr-1250/Winegard Flatwave antenna/Schedules Direct
main client: NextPVR 5.0.7 Desktop Client; LG 50UH5500 WebOS 3.0 TV
Fatman_do
Offline

Posting Freak

Posts: 3,482
Threads: 95
Joined: Nov 2005
#4
2009-09-13, 11:19 PM
There are no changes to the config.xml file with the skin plugin, only the installer.
Fatman_do
[SIZE="1"]
HTPC: AMD XP+2500, 512MB DDR (400) ~ Capture Device: Hauppage PVR-150
Storage: 30GB OS & Recording, 160GB Post Processing & Archive
Video Output: HD 32" TV via eVGA Geforce 6200le 256MB AGP DVI-HDMI cable out
Audio Output: Turtle Beach Riviera S/PDIF Optic Output (Digital pass thru only) to Home Theater Receiver[/SIZE]

[SIZE="2"]
Moderator | Tutorials | Community Skin | CommunitySkin-SVN[/SIZE]
johnsonx42
Offline

Posting Freak

Posts: 7,298
Threads: 189
Joined: Sep 2008
#5
2009-09-14, 03:28 AM
Fatman_do Wrote:There are no changes to the config.xml file with the skin plugin, only the installer.
Yes, I know it doesn't currently do this. The question is whether it can be made to do it.
server: NextPVR 5.0.7/Win10 2004/64-bit/AMD A6-7400k/hvr-2250 & hvr-1250/Winegard Flatwave antenna/Schedules Direct
main client: NextPVR 5.0.7 Desktop Client; LG 50UH5500 WebOS 3.0 TV
McBainUK
Offline

Posting Freak

Posts: 4,711
Threads: 429
Joined: Sep 2005
#6
2009-09-14, 07:37 AM
johnsonx42 Wrote:What I ultimately wish to do is to write a replacement for the existing Settings screen in PVRX2.
How strange, I was thinking this very morning about this very idea. But shelved it due to time available nowadays etc etc.

johnsonx42 Wrote:There are a variety of user-interface related settings that would be useful to change from the Skin Plugin rather than have to go in to config.exe or hand edit in config.xml.
I think it would be better to create a separate plugin to change settings, for a few reasons:
  1. The SkinPlugin is CS4 only, it only shows a "please run CS4 skin" on blue, slick etc
  2. In future I can see non-ui related settings being added, for example the quite useful codec selection options. These wouldn't make sense in a 'SkinPlugin'.
  3. And finally, I don't want to support another plugin or more features within an existing plugin.
Wiki profile
My Projects
Programs Plugin [SIZE=2](retired)
| Volume OSD Plugin (retired) | Documentation Wiki (retired)
[/SIZE]
johnsonx42
Offline

Posting Freak

Posts: 7,298
Threads: 189
Joined: Sep 2008
#7
2009-09-14, 07:50 AM
McBainUK Wrote:I think it would be better to create a separate plugin to change settings, for a few reasons:

Quote:The SkinPlugin is CS4 only, it only shows a "please run CS4 skin" on blue, slick etc
I guess I figured that would be just another reason to run CS4... handy-dandy Settings in the skin plugin.
Quote:In future I can see non-ui related settings being added, for example the quite useful codec selection options. These wouldn't make sense in a 'SkinPlugin'.
True that. It also occurred to me that any settings written into SkinPluginConfig also get saved with a theme, and therefore reset when another theme is loaded. Probably bad, definitely illogical.
Quote:And finally, I don't want to support another plugin or more features within an existing plugin.
Yep, conflict of purpose... the idea sounded good at first, but you're right it's not really a good fit within the skin plugin.

If I come up with a couple of config.xml settings I really want to be able to change on the fly myself I may hack them into my own local copy on the HTPC... but it won't be for public consumption.
server: NextPVR 5.0.7/Win10 2004/64-bit/AMD A6-7400k/hvr-2250 & hvr-1250/Winegard Flatwave antenna/Schedules Direct
main client: NextPVR 5.0.7 Desktop Client; LG 50UH5500 WebOS 3.0 TV
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 53,102
Threads: 957
Joined: May 2006
#8
2009-11-29, 04:45 AM
Fatman_do Wrote:There are no changes to the config.xml file with the skin plugin, only the installer.

I was trying to find one of my posts that identified the config.xml problem and I missed this reply. If the CS4 plugin calls the installer to makes changes to a file in the GBPVR folder on-the-fly then it still is a potential problem.

Martin
Fatman_do
Offline

Posting Freak

Posts: 3,482
Threads: 95
Joined: Nov 2005
#9
2009-11-29, 04:58 AM
The installer is not called, a separate application is run. May not change your concern however, as I do not know how the helper .exe functions with UAC permissions, ect.
Fatman_do
[SIZE="1"]
HTPC: AMD XP+2500, 512MB DDR (400) ~ Capture Device: Hauppage PVR-150
Storage: 30GB OS & Recording, 160GB Post Processing & Archive
Video Output: HD 32" TV via eVGA Geforce 6200le 256MB AGP DVI-HDMI cable out
Audio Output: Turtle Beach Riviera S/PDIF Optic Output (Digital pass thru only) to Home Theater Receiver[/SIZE]

[SIZE="2"]
Moderator | Tutorials | Community Skin | CommunitySkin-SVN[/SIZE]
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 53,102
Threads: 957
Joined: May 2006
#10
2009-11-29, 04:59 AM
Fatman_do Wrote:The installer is not called, a separate application is run. May not change your concern however, as I do not know how the helper .exe functions with UAC permissions, ect.

Any app, if it isn't run elevated (which requires a UAC prompt) would create a config.xml in the virtual store.

Martin
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (2): 1 2 Next »


Possibly Related Threads…
Thread Author Replies Views Last Post
  Minor Change for Weather2 Skin LewE 2 5,134 2009-11-29, 09:40 PM
Last Post: Fatman_do
  [DEV] TV Guide Rows change johnsonx42 7 4,035 2009-06-05, 01:04 PM
Last Post: Fatman_do
  Ignore file extension nemulate 2 2,146 2009-02-24, 11:14 PM
Last Post: nemulate
  File Opened is not a Database LewE 4 4,928 2008-11-15, 02:57 PM
Last Post: LewE
  How do I change the color of the skin divinehammer 2 2,042 2008-09-16, 02:45 PM
Last Post: divinehammer
  MVP: Apply a new theme (or how to change the theme by hand!) heinss 4 2,629 2008-09-12, 02:27 PM
Last Post: heinss
  how to change the background? tvshowman 15 6,008 2008-01-29, 02:33 AM
Last Post: Fatman_do
  Community 3 Skin, how do you change the task images? mk000 5 3,347 2008-01-28, 10:30 PM
Last Post: Fatman_do
  EPG on Channel Change colosus 3 2,500 2008-01-27, 10:53 PM
Last Post: colosus

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode