JEvents 1.5 (No longer actively supported)

Request for additional 'Conditional Fields'?

JEvents 2.0 was launched over 2 years ago and the latest stable version is version 2.2 which will run on Joomla 1.5 and Joomla 2.5. JEvents 1.5 is therefore no longer actively supported - you should upgrade to JEvents 2.2+ as soon as possible.
Forum rules
Please include as much detail in any test or bug reports for JEvents 1.5 as possible.

First of all, check if you are running the latest available version of Joomla! and JEvents. Posts for issues, where both systems are not updated, will be ignored.

We need the following at least:

* PHP version (e.g. 5.2.5). Note: Support for PHP4 is discontinued.
* Joomla! version
* JEvents version
* Web Server software (Apache or IIS with version number if possible)
* Server Operating system (e.g. Linux, Windows, Solaris, Darwin ...)
* Database version
* memory_limit from your phpinfo
* Web browser and version

Please enable error reporting and include any error messages in your posting. You do this via the Joomla Configuration - set "error reporting" to "maximum" on the Server tab.

Finally, please describe the steps required to recreate the problem and also please enable error reporting and give us any error messages generated.

Postby TheWraith » Thu May 05, 2011 2:52 pm

I apologize I did not have time to search the forum for a similar topic prior to posting...

I find the "a", "e", and "m" conditional fields within JEvents extremely useful. I would love to see additional Conditional Fields so that formatting of a module is easier to do. For example...

If "${contact}" was a conditional variable, I could do something like the following (assume 'con' is the conditional variable for '${contact}')

Code: Select all
[con:<br/>Contact: ${contact}][!con:<br/>]


Because not all of my events have a contact, or "extra info", having the ability to insert some logic of "IF EXISTS, THEN OUTPUT" would be extremely beneficial.
TheWraith
 
Posts: 38
Joined: Tue Dec 14, 2010 3:18 pm

Postby Geraint » Fri May 06, 2011 6:53 am

Its and interesting idea - for the custom fields club addon we have a mechanism that works like this:

{{fieldname|output %s if exists|output if blank}}

so you can output the field conditional on it not being blank.

I'll look at adding it into JEvents 2.0
JEvents Club members can get priority forum support at the Support Forum. As well as access to a variety of custom JEvents addons and benefits. Join the JEvents club today!
User avatar
Geraint
 
Posts: 42795
Joined: Fri Feb 15, 2008 6:14 pm

Postby TheWraith » Thu Nov 01, 2012 7:24 pm

Is there any update on this? I'm still running JEvents (1.5.5 #1871) and was looking into updating to 2.x this afternoon and the lack of conditional variables for EVERY possible field is really kicking my butt in terms of formatting the output.

My work-in-progress looks something like this:

Code: Select all
<div style="width:100%;margin-left:-3px;">

   <div style="margin-top:-4px;padding-bottom:24px;background:url(http://farrellsusma.com/modules/mod_sectionnewsflash/assets/images/events-rounded.png) no-repeat;background-size:32px 35px;font-size:6pt;text-transform:uppercase;color:#fff;text-align:center;text-shadow:#333 0 1px 1px;width:32px;padding-top:0px;margin-left:-13px;">

      <div style="margin-top:-6px;font-weight:bold;">
        ${startDate(M)}
      </div>
   </div>

<div style="padding-top:0px;margin-left:-13px;margin-top:-22px;color:#333 !important;text-align:center;font-size:7.5pt;text-transform:uppercase;width:32px;text-shadow:#fff 0 1px 1px;">
   <strong>
   [!m:
     ${startDate(j)}
   ]
   [m:
     ${startDate(j)}-${endDate(j)}
   ]
   </strong>
</div>

<div style="font-size:8pt;margin-top:-32px;margin-left:24px;margin-right:-19px;">
   <b>${title}</b>
   [!a:
     <div style="margin- top:-2px;margin-bottom:0px;">
     <i>${startDate(g:ia)}
   ]
   [!e: - ]
   [!a:
     ${endDate(g:ia)}
   ]
   </i>
   [!e:]
   [!a:
     <i> @ ${location}</i>
     </div>
   
     <div style="margin-top:-2px;margin-bottom:0px;">
     <font color="DarkRed">${extraInfo}</font>
     </div>
   ]
   [a:
     <div style="margin-top:-2px;margin-bottom:0px;">
     <i> ${location}</i>
     </div>
         
     <div style="margin-top:-2px;margin-bottom:15px;">
     <font color="DarkRed">${extraInfo}</font>
     </div>
   ]
      
   </i>
</div>

<p style="margin-bottom:12px;"></p>
[m:<div style="padding-top:1px;margin-bottom:35px;"></div>]

</div>


The ability to use conditional fields for each and every form field (From 'Subject' to 'Activity' all the way down to 'Extra Info') would be a huge, huge benefit to me. I can't tell you how much time I've spent tweaking the output HTML/CSS and I'm still stuck in certain corners.
TheWraith
 
Posts: 38
Joined: Tue Dec 14, 2010 3:18 pm

Postby Tonyp » Thu Nov 01, 2012 7:31 pm

Hello,

You could use the Custom Fields plugin for your custom fields as Geraint Mentioned above.

Alternatively.. You could create a template override for the icalevent (Event detail) and custom the php if statements for the data.

Regards
Tony
---------------------------------------
Feel free to PM me if you would like Custom Installs or Joomla! related work for a competitive quote.

User avatar
Tonyp
Team Staff
 
Posts: 23655
Joined: Tue Oct 12, 2010 9:12 pm
Location: Isle of Man

Postby TheWraith » Thu Nov 01, 2012 8:32 pm

Thanks for the response.

Quite frankly, I'm hard pressed to justify the $102.39/yr Told subscription JUST to get the CustomField plugin feature. I'm inclined to modify the free version, use the existing conditional fields as a model, and hack in additional conditional fields (assuming it's feasible in the code). I shy away from that because I don't want to have to re-hack the additional conditions each and every time I apply an update.

Decisions....decisions...
TheWraith
 
Posts: 38
Joined: Tue Dec 14, 2010 3:18 pm

Postby Tonyp » Thu Nov 01, 2012 9:43 pm

Actually the only subscription you need is the Silver 6month at $57.8.

Alternatively you could apply a very clever template over ride so changes are not lost.
---------------------------------------
Feel free to PM me if you would like Custom Installs or Joomla! related work for a competitive quote.

User avatar
Tonyp
Team Staff
 
Posts: 23655
Joined: Tue Oct 12, 2010 9:12 pm
Location: Isle of Man

Postby TheWraith » Thu Nov 01, 2012 10:53 pm

Following Geraint's original advice:

Code: Select all
${content|output %s if exists|output if blank}}


This doesn't return any content, even if it exists. However, this works:

Code: Select all
${content|120|...}}


Am I to assume the "if exists" syntax is something that only I can accomplish by becoming a club member and downloading some addon?
TheWraith
 
Posts: 38
Joined: Tue Dec 14, 2010 3:18 pm

Postby Tonyp » Fri Nov 02, 2012 7:23 am

Hello,

Yes, I quote:
for the custom fields club addon we have a mechanism that works like this:

{{fieldname|output %s if exists|output if blank}}


Kind regards
Tony
---------------------------------------
Feel free to PM me if you would like Custom Installs or Joomla! related work for a competitive quote.

User avatar
Tonyp
Team Staff
 
Posts: 23655
Joined: Tue Oct 12, 2010 9:12 pm
Location: Isle of Man


Return to JEvents 1.5 (No longer actively supported)

  • Who is online
  • View new posts
  • View unanswered posts
  • In total there are 0 users online :: 0 registered and 0 hidden (based on users active over the past 5 minutes)
  • Most users ever online was 94 on Tue Sep 01, 2009 12:33 am
  • Users browsing this forum: No registered users