41
playsome
Re: Back-ticks in Smarty templates
  • 2012/1/14 16:39

  • playsome

  • Not too shy to talk

  • Posts: 197

  • Since: 2009/4/15


Thanks for the info peekay, ive never heard of that in programming usually its single or double quotes, it actualy just took me like 2 minutes to find the back tick key on my keyboard.



42
playsome
Re: extcal 2.27 beta and xoops 2.5.4 errors/issues
  • 2012/1/14 16:30

  • playsome

  • Not too shy to talk

  • Posts: 197

  • Since: 2009/4/15


Quick update,

I had done the first part of the suggested fix which is change

define "_SHORTDATESTRING" "d/m/Y" );


in language/english.global.php to

define "_SHORTDATESTRING" "dmY" );


i had changed the php date to d/n/Y to make it more suitable for UK, upon reverting back to d/m/Y the date no longer changes to 1/1/1970, not sure why that would make a difference but it did.

so extcal seems to be working OK now, bit more testing to do and I am still concerned about not being able to find the chunk of code in class/event.php incase replacing that is vital.

Just a quick suggestion for a feature which i think should be added to extcal:

when creating a recurring event which say starts on 1/1/2012 and recurs on the same day and time every week i input the start and end date as 1/1/2012 and select recur weekly on monday for x amount of weeks which is fine.

However, if a user clicks on the event the next week i.e 8/1/2012 the date will still show as 1/1/2012, I think it would make more sense if the date the user clicked on showed on the event page?

Cheers



43
playsome
extcal 2.27 beta and xoops 2.5.4 errors/issues
  • 2012/1/14 16:08

  • playsome

  • Not too shy to talk

  • Posts: 197

  • Since: 2009/4/15


Hello all,

I am currently testing an upgrade on a test site xoops 2.4.5 to 2.5.4 upgrade went ok I have installed the new extcal also (2.27 beta) this si the latest release I can find.

I gather from other posts that there is issues with the dateformat, which i was getting errors. I have used part of the fix for extcal found on frxoops (although im not sure which version of the module the fix is intended for)

I have removed the 2 chunks of code which test if the date format it wrong I could not find this section of code however in the file class/event.php

list( $year $month $day ) = explode "-" $data 'event_start' ][ 'date' ]);
$data 'event_start' ] = mktime $month $day $year ) + $data 'event_start' ][ 'time' ];
list( 
$year $month $day ) = explode "-" $data 'event_end' ][ 'date' ]);
$data 'event_end' ] = mktime $month $day $year ) + $data 'event_end' ][ 'time' ];

if( 
$data 'have_end' ] == || $data 'event_start' ] > $data 'event_end' ]) {
$data 'event_end' ] = $data 'event_start' ];
}


The above lines where to be replaced by other lines of code.

Anyway, after applying what i could of the fix I can now submit an event and it does not show the wrong date format error BUT the event does not show in teh calendar view, it does say there is events in the DB on admin side.

Another error i have noticed is when clicking to edit an event the date will revert to 1/1/1970 which is not good.

The only errors that are produced by debug are:

NoticeConstant _MD_EXTCAL_ICONE_CLONE already defined in file /modules/extcal/language/english/main.php line 174
Notice
Constant _MD_EXTCAL_ICONE_EDIT already defined in file /modules/extcal/language/english/main.php line 175
Notice
Constant _MD_EXTCAL_ICONE_DELETE already defined in file /modules/extcal/language/english/main.php line 176


I have extcal 2.27 beta running fine on another test site which has xoops 2.4.1a installed so this is clearly an issue with the latest release of xoops.

Will extcal be fixed or xoops be fixed anytime soon? will the new blue move extcal come out of beta soon?

Thanks



44
playsome
Re: Problems with dateformat 2.5.4 in combination with modules (i.e. Extcal, News)
  • 2012/1/14 13:20

  • playsome

  • Not too shy to talk

  • Posts: 197

  • Since: 2009/4/15


I am also getting this issue on a test site with xoops 2.5.4 and the latest beta release of extcal 2.32 it think is the version. Getting wrong date format when trying to submit the event.

I translated the article at frxoops using gtranslate but is this a definate fix? and what about other modules that use dates? article module, news module, etc, etc will they be broken?

I feel upgrading to 2.5.4 is not a great idea right now no backwards compatibilty with older modules (and even newer ones it seems) not frogetting the fact that the majority of modules installed in xoops sites are not updated or maintained any longer.



45
playsome
Re: Help with module.
  • 2012/1/13 15:05

  • playsome

  • Not too shy to talk

  • Posts: 197

  • Since: 2009/4/15


Looking at the code im guessing your customising a download module by adding a flash player to play the file?

Im not totally sure what could be wrong, but im guessing its becase the player would need the full path to the file plus the file extension to play it but the download module uses the down.php with the query at the end (the id) to get the file so that probably would not work for a player.



46
playsome
Hello all module devs what is your thoughts on keeping code and presentation elements seperate
  • 2012/1/6 19:39

  • playsome

  • Not too shy to talk

  • Posts: 197

  • Since: 2009/4/15


I'm not much of a programmer, I consider myself to be more a front end developer I prefer HTML and CSS and the odd bit of javascript.

I also love xoops because I find it very easy to customise, easy to customise themes and templates. I can customise most templates to suit whichever site I am working on and it is usually pretty simple using the modules provided smarty variables to generate the content and editing the HTML and CSS to suit.

Where it becomes a tad trickier is when a modules php code is generating HTML elements. I have to try and hunt down which code is generating which elements and figure out how to edit that code so i can add a class or id or whatever without breaking the module.

I realise alot of module devs probably already keep all functionality of the module completely seperate from the presentation/template side, but some dont and personally I feel it makes it so much more difficult to customise things.

I feel one of xoops great strengths is it's customisability, if you know some HTML and css you can pretty much get things looking exactly how you want on a site wide basis.

So what are your thoughts on this, should all HTML elements only be inside templates or is there a need to sometimes generate elements inside PHP code?



47
playsome
Validation errors caused by mytabs and a fix
  • 2012/1/3 18:48

  • playsome

  • Not too shy to talk

  • Posts: 197

  • Since: 2009/4/15


Hello xoopsers,

Ive been attempting to get my site to validate and I had some strange errors on the validator, let me explain.

On one page I had one error, a missing closing </ul> tag, so i fixed this and it gave me even more errors.

A couple of errors where to do with attributes contruct errors in the mytabs module.

Basically there was no space between rel="" and class="tabs-selected". I believe this threw some other errors such as tag mismatch, etc which i just dont think existed.

Anyway to fix the attributes contruct error with mytabs open up blocks/mytabs_block.php and on line 56 find the line

$selected 'class="tabs-selected"';


And in the value for the variable ad a space at the very start like so

$selected ' class="tabs-selected"';


and this should fix the attributes construct error.




48
playsome
Re: Trying to get extcal minical block template to validate
  • 2012/1/1 18:17

  • playsome

  • Not too shy to talk

  • Posts: 197

  • Since: 2009/4/15


HI peekay,

I think validation is pretty important, as a computer science student we are always taught to validate our code, although maybe it is not that important (google doesnt validate) but having errors like unclosed tags i just dont like.

I had searched the extcal files for isEvent but could see no reference to it anywhere except the template so im not sure what underlying php code it was getting data from.

that particular smarty tag did seem to not do much it seemed to always return false (i.e not close the <a> tag).

Thanks for the references, i'll take a look at them.

Cheers



49
playsome
Re: Trying to get extcal minical block template to validate
  • 2012/1/1 2:31

  • playsome

  • Not too shy to talk

  • Posts: 197

  • Since: 2009/4/15


I think I have finally solved this.

Here is the modifications to the template code and I no longer get any a tag ommitted errors when validating

<td>
                        <{if !
$day.isEmpty}>
                                 <{if 
$day.haveEvents}>
                                         <
a href="<{$xoops_url}>/modules/extcal/day.php?year=<{$weeks.weekInfo.year}>&amp;month=<{$weeks.weekInfo.month}>&amp;day=<{$day.number}>">
                                 
                                 <{
$day.number}>
                                
                                         </
a>
                                         
                                 <{else}>
                                 <{
$day.number}>        
                                 <{/if}>
                                 
                        <{else}>
                                 &
nbsp;
                        <{/if}>
         </
td>


Basically i have removed the variable <{if $day.isEvent}> (not sure if that was actually doing anything as it did not seem to return true or false.), extended the if day.isEvents closing if after the closing a tag and added in an extra else statement so if the day has no events but is a calendar day it will display the day number.

Hope this helps someone else out.



50
playsome
Re: Trying to get extcal minical block template to validate
  • 2011/12/31 20:35

  • playsome

  • Not too shy to talk

  • Posts: 197

  • Since: 2009/4/15


Just a correction,

the closing </a> DOES NOT show in the page source

<td><a href="http://www.whitlawburncrc.org.uk/calendar/day.php?year=2011&amp;month=12&amp;day=1">1                    </td>


the above is a copy/paste from the source code of one of the minical cells with an event, as you can see the closing </a> is missing but it is clearly there in the template so the tag <{if $day.isEvent}> is making the closing a tag not appear for some reason.




TopTop
« 1 2 3 4 (5) 6 7 8 ... 17 »



Login

Who's Online

223 user(s) are online (139 user(s) are browsing Support Forums)


Members: 0


Guests: 223


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits