vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.7 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=228)
-   -   Mini Mods - Advent Calendar 2008 (https://vborg.vbsupport.ru/showthread.php?t=195245)

Coroner 11-01-2008 10:00 PM

Advent Calendar 2008
 
What is it ?
It's a simply Advent Calendar. I've filled it with images,music and videos (youtube or myvideo).
Each day (there are only 24 :) ) can have an image url or data (data like: <object ....).

How does it works ?
Like an advent calendar. I've created an simply template with an iframe in it. In this frame you will see a background-picture, doors (is the word correct ?) (calendar days) and - if you set it to on - snowflakes.
This calendar can only use on december and a day will only open if it's the correct day or an earlier day.
Example: it's 7th of december, so you can open all day include the 7th.
Each day will give a popup window (you can change the size for each day).
If you try to open a calendar day on a later date it will give you an error (confirm script) - this can also, when a day is "empty".
Empty means:
You have entered an image-url but selected "data" (in admincp) or you selected "image" but the image-url is empty.
After install all 24 days are filled will "funny movies", "pictures", "flash" or "music". You can change everything you like.

There are a few settings (is online, snowflakes on/of and count of snowflakes).
Also there are only 2 permissions:
- the permission to use the calendar
- the permission to test the calendar

If you set a usergroup to test the calendar, the users can see and click all the days of the calendar - that needed for testing !

Some technical
The iframe-size is set to 1024x768 and can changed in the template adventcalendar.
All images, javascript and the background html lies in: images/advent.
If you wanna change the backgound-image, change "images/advent/wallpaper.jpg".
The snowflake image can also changed (images/advent/snowflake.gif)

Installation
There is NO installation READ.ME !
Simply upload all files and import the product.
The product creates a plugin that used $template_hook[navbar_buttons_left] for the navbar.

P.S. deutschen Support gibt es auch bei your-vb

Coroner 11-02-2008 01:02 PM

*reseverd for ...*

RedeemedWarrior 11-02-2008 01:19 PM

Gonna install this :D

donald200 11-02-2008 03:08 PM

thanks a lot https://vborg.vbsupport.ru/external/2008/11/26.gif

thompson 11-02-2008 04:04 PM

looks pretty cool.

hobsdv 11-02-2008 08:09 PM

installed but dont see a link in the navbar

how do i add it.

Krazeguy 11-03-2008 12:19 AM

Will keep an eye on this for December, cheers.

Coroner 11-03-2008 03:29 AM

Quote:

Originally Posted by hobsdv (Post 1658097)
installed but dont see a link in the navbar

how do i add it.

Set the userrights (enable: can test calendar). If so, check your template (navbar), maybe there's the template_hook missing.

redlabour 11-03-2008 06:07 AM

Awesome and works perfectly. :)

petchat 11-03-2008 08:07 AM

Great, working fine here :D

EDIT: I'm getting a javascript error with IE... Not sure if it's me or not though tbh.

Coroner 11-03-2008 01:26 PM

My wife got also an javascript error (IE7).
You can try the following:

open advent.htm
and search for "window.open(....)"

in this line you will see: "Advent Day: " + id, ...
cange this into: "AdventDay", ...

mechanist 11-03-2008 02:01 PM

Well, still the same error...

hobsdv 11-03-2008 02:57 PM

ok now i can see the link

How do i change what is in each day

i would like to have an image of a website with a link to it

mechanist 11-03-2008 03:00 PM

Ok, I missed a Character, it works now, but the window does open up with wrong sizes in IE.

Rottimom 11-03-2008 03:02 PM

Quote:

Originally Posted by petchat (Post 1658391)
EDIT: I'm getting a javascript error with IE... Not sure if it's me or not though tbh.

With me exact so.

Quote:

Originally Posted by Coroner (Post 1658544)
My wife got also an javascript error (IE7).
You can try the following:

open advent.htm
and search for "window.open(....)"

in this line you will see: "Advent Day: " + id, ...
cange this into: "AdventDay", ...

Change doesn't eliminate the mistake.

mikey1991 11-03-2008 03:11 PM

how do i make this work well? can i add my own vids and pics?

hobsdv 11-03-2008 03:12 PM

Quote:

Originally Posted by mikey1991 (Post 1658623)
how do i make this work well? can i add my own vids and pics?

thats what i need to know

how do we change the vids to images and links

Coroner 11-03-2008 03:49 PM

So, the question is. Which error and in which line.
you can see the error by clicking the little small icon (bottom left in your browser). The template is always: advent.htm

@hobsdv AND @mikey1991
Have you take a look in the AdminCP ? you can change each day individually and also you can give each popup another size.

hobsdv 11-03-2008 04:32 PM

Quote:

Originally Posted by Coroner (Post 1658655)
So, the question is. Which error and in which line.
you can see the error by clicking the little small icon (bottom left in your browser). The template is always: advent.htm

@hobsdv AND @mikey1991
Have you take a look in the AdminCP ? you can change each day individually and also you can give each popup another size.

thanks found it,

Next issue. Is there a way to make them open in a new browser window rather than a popup javascript box

Rottimom 11-03-2008 05:15 PM

Quote:

Originally Posted by Coroner (Post 1658655)
So, the question is. Which error and in which line.
you can see the error by clicking the little small icon (bottom left in your browser). The template is always: advent.htm

Excuse me, I am writing German now.

Zeile: 38
Zeichen: 4
Fehler: Ung?ltiges Argument
Code: 0
../../../../advent.htm

Zeile 38:
Code:

  window.open("./../../adventcalendar.php?do=open&securitytoken=" + parent.SECURITYTOKEN + "&day=" + id, "AdventDay: " + id,"width=" + pw + ",height=" + ph + ",left=5,top=5,location=0,menubar=0,resizable=0,scrollbars=0,status=0,toolbar=0");

Coroner 11-03-2008 05:27 PM

Ok, see your post:
Code:

&day=" + id, "AdventDay: " + id,"width=" + p
change into:
Code:

&day=" + id, "AdventDay","width=" + p
Maybe this will help. I think the "spacer" in the title is the mistake.

You can get german Support at your-vb.com if you like.

Rottimom 11-03-2008 05:43 PM

It is working thank you now.

The correct line 38:

Code:

  window.open("./../../adventcalendar.php?do=open&securitytoken=" + parent.SECURITYTOKEN + "&day=" + id, "AdventDay","width=" + pw + ",height=" + ph + ",left=5,top=5,location=0,menubar=0,resizable=0,scrollbars=0,status=0,toolbar=0");

petchat 11-03-2008 06:59 PM

Coroner, your fix on Page One does work.

My line in complete now reads:

Code:

window.open("./../../adventcalendar.php?do=open&securitytoken=" + parent.SECURITYTOKEN + "&day=" + id, "AdventDay", + id,"width=" + pw + ",height=" + ph + ",left=5,top=5,location=0,menubar=0,resizable=0,scrollbars=0,status=0,toolbar=0");
It is line 75 on my advent.htm - It's probably around 38 on everyone elses though, Dreamweaver seems to have added an immense load of empty lines in my file. Grrr

Thanks very much :)

Keesa 11-04-2008 05:41 AM

Auf Deutsch? Unsere Tokio Hotel vB wird so glücklich! Heehee.

Coroner 11-04-2008 07:21 AM

You can't get german support here.
See the post of @rottimom.

Change the line in advent.htm (I will change the download in the afternoon)

carphead 11-05-2008 06:17 AM

With everything set up including the usergroup set to test and use when I call adventcalender.php I just get this displayed

options['advcsettings_online'] ? 1 : 0); $can_use_adv = (($permissions['adventpermissions'] & $vbulletin->bf_ugp_adventpermissions['canuseadvent']) ? 1 : 0); $can_test_adv = (($permissions['adventpermissions'] & $vbulletin->bf_ugp_adventpermissions['cantestadvent']) ? 1 : 0); if (!$can_test_adv) { if (!$is_online OR date('n', TIMENOW) != 12 OR !$can_use_adv) print_no_permission (); } $snowflakes = $vbulletin->options['advcsettings_snowflakes']; $have_snow = $vbulletin->options['advcsettings_snow']; $vbulletin->input->clean_array_gpc ('r', array ( 'do' => TYPE_NOHTML, 'day' => TYPE_INT, )); if ($vbulletin->GPC['do'] == 'open' AND $vbulletin->GPC['day']) { $data = $db->query_first ("SELECT * FROM " . TABLE_PREFIX . "adventcalendar_days WHERE adventcalendar_daysid=" . $vbulletin->GPC['day']); echo '
'; if ($data['bitfield'] == 1) { $size = ''; if ($data['pwidth'] AND $data['pheight']) $size = 'width="' . $data['pwidth'] . '" height="' . $data['pheight'] . '" '; echo ''; } else if ($data['bitfield'] == 2) { echo $data['data']; } echo '
'; exit (); } $navbits[''] = 'Advent Calendar'; $navbits = construct_navbits ($navbits); eval ('$navbar = "' . fetch_template ('navbar') . '";'); $pwidth = $pheight = $pcontent = array (0); $datas = $db->query ("SELECT * FROM " . TABLE_PREFIX . "adventcalendar_days ORDER BY adventcalendar_daysid ASC"); while ($data = $db->fetch_array ($datas)) { $pwidth[] = $data['pwidth']; $pheight[] = $data['pheight']; if ($data['image'] != '' OR $data['data'] != '') { if (($data['bitfield'] == 1 AND $data['image'] != '') OR ($data['bitfield'] == 2 AND $data['data'] != '')) $pcontent[] = 1; else $pcontent[] = 0; } else $pcontent[] = 0; } $tpl_pw = implode (',', $pwidth); $tpl_ph = implode (',', $pheight); $tpl_pc = implode (',', $pcontent); eval ("print_output (\"" . fetch_template ("adventcalendar") . "\");"); exit (); ?>

Any ideas? I've double checked that all the files are uploaded correctly.

Coroner 11-05-2008 06:45 AM

Try to upload the php in binary mode.

cykelmyggen 11-05-2008 10:59 AM

I don't see the link in my navbar and I think maybe it's the template_hook missing.
I'm not aware of how to fix this problem. Could need a tiny piece of advice on this one, as I would love to have this running from 1.12.;)
PS Userrights has been assigned

Coroner 11-05-2008 03:55 PM

A little bit of code of the template navbar:

Code:

                <if condition="$show['registerbutton']">
                        <td class="vbmenu_control"><a href="register.php$session[sessionurl_q]" rel="nofollow">$vbphrase[register]</a></td>
                </if>
                $template_hook[navbar_buttons_left]
                <td class="vbmenu_control"><a href="faq.php$session[sessionurl_q]" accesskey="5">$vbphrase[faq]</a></td>


cykelmyggen 11-06-2008 09:45 AM

OK It's showing now, but with - at least I think - Java-related error. It breaks my fixed forum and keeps popping up and down in size - putting scrollbars on and off very fast?

Coroner 11-06-2008 12:24 PM

Take a look in adventsnow.js
find this line:
Quote:

if (yp[i] > doc_height)
and change it into:
Quote:

if (yp[i] > doc_height - 30)
doc_height is the end of the frame so, you have to test it out, if 30 is ok or maybe better 35 ...

cykelmyggen 11-06-2008 01:13 PM

Thanks, that fixed the popping problem:up: Is there a way to change width? As you can see in the attached screenshot it is a little too wide for my fixed width?

Coroner 11-06-2008 03:53 PM

See the 1st post (modification) edit "adventcalendar"

cykelmyggen 11-06-2008 07:02 PM

Fixed, thanks for excellent support so far:up:

Lustikus 11-07-2008 02:45 PM

hi,

i want to add the link in the quick links, but i didnt find the link in the normal navbar...which line i have to delete to get rid of the link ?

thanks

Coroner 11-08-2008 03:16 AM

I use the template hook (see in the product). You have to change it manually

cykelmyggen 11-08-2008 04:58 AM

I've searched in Phrasemanager and in Templates in order to translate the word "Advent" in navbar - so far without luck?

carphead 11-08-2008 08:57 AM

Quote:

Originally Posted by Coroner (Post 1659777)
Try to upload the php in binary mode.

Just to make sure I uploaded the original Zip file and then extracted it on the server. Still the same problem.

Coroner 11-08-2008 11:40 AM

I do not know, why he should display the php/product code - sorry

Landlady 11-08-2008 12:13 PM

i love it !!!!!!!! thank you :)


All times are GMT. The time now is 09:28 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01510 seconds
  • Memory Usage 1,821KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (6)bbcode_code_printable
  • (9)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete