User(s) browsing this thread: 1 Guest(s)
|
oversight macro & variable doubt
|
|
05-01-2012, 07:02 PM
|
|||
|
|||
oversight macro & variable doubt
Setzer Wrote:Sorry for bother you again, im playing with oversight skins Hi, It might be better to post in the forums so other can advise. esp with javascript. It looks like Javascript will be the simplest solution. Also page_max is calculated from nubmer of items / rows * cols - and I thnik these are all available as $xx variables so you can do simple arithmetic on them? Oversight: Jukebox | FeedTime: Automatic nzbs |
|||
|
05-01-2012, 10:53 PM
(This post was last modified: 05-04-2012 03:56 PM by Setzer.)
|
|||
|
|||
|
RE: oversight macro & variable doubt
ok, i'll paste here solution for future references:
The idea is build two links for our skin, back and next for move in the grid, when we are in the 0 and last page, link dessapear. a solution using javascript is: Code: <script type="text/javascript">I used the macro [:PAGE_MAX:], now whe know where the grid ends. Macro [:PAGE:] will tell us in what page we are. With both variables, we can build the links to move to Back and Next page. Remember, the grid start at page 0. |
|||
1 user says Thank You to Setzer for this post |
|
05-04-2012, 06:58 PM
|
|||
|
|||
|
RE: oversight macro & variable doubt
I again, have a new question.
I want add a new page to my skin, an example mynewfile.template. There are a way to Oversight process it? was thinking, like other solution, in a [:if:] in menu.template, evaluating via url, but don't know if oversight have a way to do it directly. ty, regards. |
|||
|
05-04-2012, 08:27 PM
|
|||
|
|||
|
RE: oversight macro & variable doubt
Not quite sure what you mean. You want to include a file so its output is merged with the current file?
Or you want to link to something? Oversight: Jukebox | FeedTime: Automatic nzbs |
|||
|
05-04-2012, 09:00 PM
|
|||
|
|||
|
RE: oversight macro & variable doubt
i want link to a file, and parse it with oversight.
i'll try explain it :) for example i created a new file called test.template <html> <head></head> <body>[:GRID:]</body> </html> And i put a link in menu.template pointing to test.template Then i want parse it through oversight for get a grid in test.template. |
|||
|
05-04-2012, 10:00 PM
|
|||
|
|||
|
RE: oversight macro & variable doubt
You mean INCLUDE_TEMPLATE ?
menu.template PHP Code: <html>test.template PHP Code: [:GRID:] Note the end result should be a proper html page so included templates would not usually have <html> tags. but a fragments/pieces of a page. Oversight: Jukebox | FeedTime: Automatic nzbs |
|||
|
05-04-2012, 10:55 PM
|
|||
|
|||
|
RE: oversight macro & variable doubt
sorry again, i'm dull explaining
![]() i'm trying avoid include. i'm working in this skin http://www.subirimagenes.com/otros-oldci...73162.html , where you see Test is a link what must load test.template ,forgetting main.template, and if test.template have macros, must be processed. maybe there are a way or macro to do it, i tryed too [:TEMPLATE_URL:], but it give me a direct link to the file. don't know if oversight can do something like http://your-ip:8883/oversight/oversight.cgi?loadtemplate=test.template and then instead load main.template, oversight show me the new file. if have a macro, process it. |
|||
|
05-05-2012, 12:29 AM
|
|||
|
|||
|
RE: oversight macro & variable doubt
Ah the closest to that is LINK this will link back to oversight.cgi with new parameter list...
eg. [:LINK(view=menu&a=b,Test):] However the only values for view are tv, movie, tvboxset, movieboxset , menu , person and admin So I think you need one control file for each view. eg.. menu.template PHP Code: [:IF($?menu=1):]then menu2.template PHP Code: stuff for menu 2. Not pretty. I , I'll put up a new version with a template name parameter (tn) so you can do [:LINK(view=menu&tn=menu2):] Note the links have history stored in the query string to to get back you just need a Back button. Oversight: Jukebox | FeedTime: Automatic nzbs |
|||
|
05-05-2012, 02:27 AM
|
|||
|
|||
|
RE: oversight macro & variable doubt
Done r2316 has template name query parameter - eg tn=test
[:LINK(tn=info,Info):] will create a text link <a href="..?tn=nfo>Info</a> Otherwise you can mannually add to a href directly in the code. <a href="[:URL_BASE:]/oversight.cgi?tn=test"><img src="/some/image"/></a> There is also [:BANNER_URL:] to get the new TV Banners. <img src="[:BANNER_URL:]" /> Oversight: Jukebox | FeedTime: Automatic nzbs |
|||
1 user says Thank You to lordy for this post |
|
05-05-2012, 09:47 AM
(This post was last modified: 05-05-2012 09:47 AM by Setzer.)
|
|||
|
|||
|
RE: oversight macro & variable doubt
genial, that's exactly what i was looking :)
thanks for your efforts! |
|||
|
« Next Oldest | Next Newest »
|

Twitter
Facebook
NMT Wiki
Search
Member List
Help
A-400 [13 May 2013]






![[+]](images/collapse_collapsed.gif)

