View Full Version : $eid and past events
01-16-2006, 06:59 PM
1. Where can i find the $eid variable? I have found all other variables in the script like [date] or [descr]
I thought on the EID variable to use it for setting anchors to directly point at a special event (also from outside the own website).
2. Is there a way to split the categories as variable, if i have more than one for further processing? E.g. i have a category for location, teacher, ... and only want to process the locations...
3. Is there a way to show only past events up to the actual date? Something like the opposite of $noOld = 1; ? (I would need this for making an archive)
Or is it possible to show only the events in a selected period? (E.g. all events of the second half of a year)
4. Is there a possibility to parse PHP-code in the templates?
01-16-2006, 07:31 PM
1. It's a unique ID number that's used in the database. The [eid] function of the description parser should print that number for an event.
2. Can you give a detailed example?
3. a. There isn't a way to show only old events.
3. b. You can create your own calendar page and hard-code in the months to be displayed and disable the navigation of the calendar.
4. This isn't a supported feature. I'll look into it for a future release.
02-02-2006, 09:00 PM
thanks for your quick reply as usual, but now i had been quite busy last week, so i had no time to continue my questions.
But now here they are ;)
i dont have any idea how to use, or better how to get the [eid]...
is there a way, how i can parse it somehow, to get the anchors to the selected events i talked (best would be in list mode)?
What i want is a little bit complicated to explain (as ususal ;-))
i do have several categories and some subcategories.
E.g. an event is defined with categories like type of event, teacher and location.
I process the values of an event to a subscription form.
And now there would be the need to send different email-answers depending on the event-type.
So i just fried my brain to find out, if there is a way to seperate these subcategories, that you splitted with <div> tags in different variables from $category to $type, $teacher, $location
State at the moment is:
$category = <div>type</div><div>teacher</div><div>location</div>
What i wish to get is:
You know, what i mean?
can you please explain to me how to hard code the months?
I think i can get it working in calender view, but is this also possible in list mode? ...smoking brain cells :confused:
4. got it! ;)
02-03-2006, 07:26 AM
ARGH!! this is my 3rd time trying to post this.. I'm too slow typing and it logs me off..
Ok, I'll try my best to answer this for you.
1. You can find all the information about the description parser (http://docs.easyphpcalendar.com/source/EventManager/Parser.htm) in the online documentation. You will find all the info about [eid] there.
2. I'm not sure how you get what you posted about $category and the divs, but it looks like it would be possible to split using a few replace, an explode and a list...
$category = str_ireplace("</div>","",$category);
$category = str_ireplace("<div>", ",", $category);
$temp = explode(",", $category);
list(, $type, $teacher, $location) = $temp;
3. Yes, it works the same way. If the list you're going to display is in the past, make sure you don't use $noOld as you would get no result at all. Just hard code $mo and $yr for the specific month and year you ant displayed in the list.
02-03-2006, 05:51 PM
thanks for your help!
i think the information of the description parser is my most read part in the docu. but perhaps i am just too stupid to check it ;-)
The described way works for all variables perfect BUT the [eid].
So please, can u give me an example, how you can display it?
I tried it in multiple ways, but none worked ...:confused:
sounds great and smart ... i will try something in that direction and will post it, when it works ...
many thanks! that works at least for months. Is there a way to get a shorter period like weeks or days? Otherwise i can live with that! thanks again! :clap:
atm i use following code (just to give an example, it shows the first 5 months of 2005):
$yr = 2005;
$mo = 1;
$listMonths = 5;
$DF = "l - d.m.Y ";
require ("kalender/calendar.php"); ?>
02-03-2006, 09:26 PM
1. It should work right out of the box... If you put "[eid]" (without the quotes) somewhere in your event description, it should be replaced by the actual event id number (i think it's the day number since the Unix epoch)
2. glad to be of help
3. Like you said, this works well for months. Although it is possible to limit it to weeks or even a single day, since there is no way to specify which day to start from, it will always start on the 1st of the month. If you wanted to use it for a single day, you might want to look into the Blog mode.
vBulletin® v3.8.4, Copyright ©2000-2013, Jelsoft Enterprises Ltd.