Guest - Testers are needed for the reworked CDateTime core component. See... https://forum.kodi.tv/showthread.php?tid=378981 (September 29) x
  • 1
  • 2
  • 3
  • 4(current)
  • 5
  • 6
  • 72
Release Forum Browser - Programs Addon
#46
mbetter Wrote:Can I hold you to this? :) I'm trying to get the hfboards.com forums to work, is there any chance you can take a peek and give me a heads up on some things that I'm going to have to change? I can muddle my was through regular expressions, I'm just looking for a "what is used for what" kind of overview and a list of a few things that I'm going to have to look at.

I did some of the work for you :)

Below is the start of a file for hfboards.com

This gets you the forums list and threads list. Notice the import at the top. This uses everything from the existing forum.xbmc.org file, and everything after it overrides that file. Most of it won't need to be changed in the hfboards.com file. I set some colors in the them to match the site. Change them if you wish. The logo won't show up in current versions. I found and fixed a bug that caused it not to work on full URL's.

What you'll need to do from here is copy the filter:replies and filter:post over from the forum.xbmc.org file and modify them to work. The filter:replies grabs all the text that contains the post data, and the filter:post extracts the actual data from that text. You may not need to alter the filter:replies, but you will need to modify the filter:post for sure. I got it to list posts on one thread but the data was empty. On other posts it would hang the script, probably stuck in a regex loop.

Once that is working you can test out some of the other things, like subscriptions, private messages, logins, etc. Some or all may work already.

The files are located in the addon folder under forums.

Some notes on the file syntax:
The basic line format:

type:id=data

data includes everything after the = until the end of the line (no quotes,etc)

ex: url:login=index.php

There is also the copy syntax:
type:id===id

The following will use the same filter for subscriptions as threads and must follow the threads def

filter:subscriptions===threads (must follow the threads def)

Lines that start with # are considered comments, blank lines are ignored.

I learned a bunch about Regular Expression while writing this addon, so some of my earlier ones are not very well done even though they work :)

Anyway take a look and drop me an email at [email protected] with any questions, and so I can send you files if necessary.

Code:
import:forum.xbmc.org

url:base=http://hfboards.com/

filter:forums=(?:(?P<subforum>\s)|<div>)(?:<a\shref="forumdisplay.php\?).*?f=(?P<forumid>\d+)">(?P<title>.*?)</a>(?:</div><div class="smallfont">(?P<description>.*?)</div>)?

filter:threads=<!---/IGNORE THREAD --->(?P<sticky><span style="float:right"> <img class="inlineimg" src="images/misc/sticky.gif")?.*?<a href="showthread.php\?[^<>]*?t=(?P<threadid>\d+)"\sid="thread_title.*?>(?P<title>.*?)</a>.*?window.open\(\'member.php\?.*?u=\d+\', \'_self\'\)">(?P<starter>.*?)</span.*?<a class="speciallink" href="member.php[^>]*?>(?P<lastposter>.*?)</a>


### Theme ####################################
theme:window_bg=FF193F6B
theme:title_bg=FFD7DBE7
theme:title_fg=FFCB3232
theme:desc_fg=FF000000
theme:post_code=FF005500
Reply
#47
Submitted... may take some time to appear on repo.

Added the ablility to follow post links on my new Web Viewer addon.
Reply
#48
Just recently i started getting this script error, heres my debug log:

http://pastebin.com/gQUytBxb
Reply
#49
jolid Wrote:Just recently i started getting this script error, heres my debug log:

http://pastebin.com/gQUytBxb

How did you install the addon? The error is caused because it's failing to import from the Web Viewer addon, which if you installed from the repo, should have been installed automatically. If you install the Web Viewer addon, the error should go away.
Reply
#50
ruuk Wrote:How did you install the addon? The error is caused because it's failing to import from the Web Viewer addon, which if you installed from the repo, should have been installed automatically. If you install the Web Viewer addon, the error should go away.

Thank you, that fixed it. Cant remember uninstalling the web viewer though but yeah, I guess I must have..
Reply
#51
Great addon. It works great, but it seems a bit stretched on my 1080p tv.
Image

I´m using Xperience skin if it matters.
Reply
#52
Haven't seen much activity as of late and really hope this great addon is still being developed because I've recently started skinning it for reFocus and have been running into a few hurdles that I'm hoping can be overcome.

The trouble I'm running into mainly deals with the textcolor of the labels. I see that they are hardcoded into the forum code. Is there any chance we might be able to set those textcolors via the label controls? Or barring that, perhaps a color.xml file placed in the skin directory?

I appreciate all the hard work you've put into this. This addon is one of the few addons I use on a daily basis and really enjoy the ability to check the forums without having to leave the comfort of the couch.
Reply
#53
Sranshaft Wrote:Haven't seen much activity as of late and really hope this great addon is still being developed because I've recently started skinning it for reFocus and have been running into a few hurdles that I'm hoping can be overcome.

The trouble I'm running into mainly deals with the textcolor of the labels. I see that they are hardcoded into the forum code. Is there any chance we might be able to set those textcolors via the label controls? Or barring that, perhaps a color.xml file placed in the skin directory?

While not very active at the moment Smile, I'm still maintaining the addon and will continue to add features as and when I think of some that are important to me. Lately I've just been dealing with large life events unrelated to the joys of python scripting.

Anyway, the hard coded colors are there because the idea is to have them themed to the forum. What I think would be a good idea and should solve your problem is if I added the option of disabling forum themes (perhaps making that the default), so that the skin can determine the colors. I'll try to get to that sooner rather than later Smile

As an aside, I think I should rename all the image files so they have a unique namespace, so if you find that in the next release, I apologize in advance for the pain and suffering that will probably cause you Blush

Sranshaft Wrote:I appreciate all the hard work you've put into this. This addon is one of the few addons I use on a daily basis and really enjoy the ability to check the forums without having to leave the comfort of the couch.

Thanks for that. That was what I had in mind when I wrote the addon and it's nice to know someone is finding it useful in that way.
Reply
#54
ruuk Wrote:While not very active at the moment Smile, I'm still maintaining the addon and will continue to add features as and when I think of some that are important to me. Lately I've just been dealing with large life events unrelated to the joys of python scripting.

I wish you all the best and hope it isn't too serious.

[quote=ruuk]Anyway, the hard coded colors are there because the idea is to have them themed to the forum. What I think would be a good idea and should solve your problem is if I added the option of disabling forum themes (perhaps making that the default), so that the skin can determine the colors. I'll try to get to that sooner rather than later Smile

Thank you very much and look forward to seeing what you come up with.

ruuk Wrote:As an aside, I think I should rename all the image files so they have a unique namespace, so if you find that in the next release, I apologize in advance for the pain and suffering that will probably cause you Blush

Argh!! No...I'm sure it'll fine. Laugh
Reply
#55
Ok Sranshaft. Try this out:

http://forumbrowserxbmc.googlecode.com/f...-0.8.3.zip

Changes:
Added 'Use Forum Colors' option in settings (disabled by default). Allows other skins to diplay properly.
Renamed skin image files to give a unique namespace

Here are the regular expressions I used in Eclipse for the filename changes. Hope you have an editor that can use them. You may have to replace the $4 with \4 or something.

-xml regexp file name replacements (case sensitive)-

Find: >(TR)?(FB)?(default-)?([\w-]*?.png)<
Replace: >forum-browser-$4<

Find: "(TR)?(FB)?(default-)?([\w-]*?.png)"
Replace: "forum-browser-$4"


-image file renaming-

FB*.png forum-browser-*.png
TR*.png forum-browser-*.png
default-*.png forum-browser-*.png
Reply
#56
Wow! Thanks for the quick update. Things are working great so far though I have run across a couple things.

Button id="105" doesn't inherit the textcolor and selectedcolor of the button in the skin.
Label id="103" doesn't inherit the textcolor while updating the text (the "Reading data", "Loading..." text changes).

Image

Label id="103" and "104 don't inherit the proper font style. They appear bold while the skin calls for normal. Shown in the following example, the top image is what it should look like, the bottom is what it looks like currently.

Image

Again, I really appreciate all of the work you've put into this. Thanks a lot mate!
Reply
#57
Ok, I think I got all the color and bold overrides cleaned out including several you didn't mention. Also now in the forum view you can do a StringCompare(ListItem.Genre,sub) to find sub-forum status, and in the threads view ListItem.Director = me indicates the thread was started by the user and ListItem.Studio = me indicates the last post was by the user.

Get it here:

http://forumbrowserxbmc.googlecode.com/f...-0.8.4.zip
Reply
#58
Sorry I haven't been able to respond sooner but I wanted to give a huge thanks to Ruuk for all the work he's done the last couple of days in getting this great addon working for skins. I really appreciate it mate! If you're ever in the Melbourne area, the beers are on me.
Reply
#59
For anyone interested I've got the Forum Browser working on Boxee (including the Boxee Box)
I've also done a couple of other minor Boxee apps as well.

Add repository http://2ndmind.com/boxee

And, no, I'm not stopping XBMC app development Smile I still have 3 times more XBMC in my house than Boxee Wink
Reply
#60
hi ruuk im trying to make a forum parce of vapeando.com/foro/ im using the http://www.xbmc4xbox.org cuz is phpbb but i have some problems is not open is parcing all the time
do we need to upload something to the root of the website?

i love this addon but i like to have more of my forums avalible


url:base=http://www.vapeando.com/foro/

what im doing wrong
thanks for you help
Reply
  • 1
  • 2
  • 3
  • 4(current)
  • 5
  • 6
  • 72

Logout Mark Read Team Forum Stats Members Help
Forum Browser - Programs Addon5