Forum Activity for @iamtimbo

iamtimbo
@iamtimbo
08/14/17 10:26:15AM
301 posts

Processing a smarty variable inside {literal}


Using Jamroom

Gotcha. Sorted. Thank you. Overthinking as usual! :)
iamtimbo
@iamtimbo
08/14/17 06:58:48AM
301 posts

Processing a smarty variable inside {literal}


Using Jamroom

I would like (some very privileged) users to be able to add a snippet to a form (e.g. from http://www.gettyimages.co.uk/resources/embed), and then display it.

However, as the snippet has JavaScript in it, it needs to be wrapped with {literal} tags in the output template, but of course when you do that, it doesn't process the variable from the array:

{literal}
{$item.remoteimage_snippet}
{/literal}

Is it even possible to extract the snippet within literal tags, or does smarty start to eat itself? For reference, the snippet looks like this:

<a id='8U7eAtVYRcZZvolcN-XWTw' class='gie-single' href='http://www.gettyimages.co.uk/detail/HA8271-001' target='_blank' style='color:#a7a7a7;text-decoration:none;font-weight:normal !important;border:none;display:inline-block;'>Embed from Getty Images</a><script>window.gie=window.gie||function(c){(gie.q=gie.q||[]).push(c)};gie(function(){gie.widgets.load({id:'8U7eAtVYRcZZvolcN-XWTw',sig:'xsRNMqHbH3vZI8R3Nky7Cky6BNNwUBPGMjQdiuT1cuE=',w:'511px',h:'335px',items:'HA8271-001',caption: true ,tld:'co.uk',is360: false })});</script><script src='//embed-cdn.gettyimages.com/widgets.js' charset='utf-8' async></script>

updated by @iamtimbo: 11/13/17 12:27:18AM
iamtimbo
@iamtimbo
08/09/17 10:12:08AM
301 posts

Widgets on SB Index page falling outside page layout


Using Jamroom

It's not pulling in any of the normal HTML or CSS, right from the beginning of the page up to the page content - which has the same info and templates as every other county page - no big images or fancy features etc. I would suspect div issues again, if it didn't work for the other profiles in the same quota.

Odd that you could open kent and I can't....
IMG_4453.PNG.png IMG_4453.PNG.png - 100KB
iamtimbo
@iamtimbo
08/07/17 01:02:34PM
301 posts

Widgets on SB Index page falling outside page layout


Using Jamroom

Yep - that was it - it was actually a unclosed div in a template that rarely gets called for in the timeline; it had occurred and unbalanced everything.

Whilst doing that search, though, I discovered that one profile page is crashing, despite calling on a template that is successfully used by lots of others. It's also generating an error in the log:

[07-Aug-2017 20:37:22 Europe/Dublin] PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 262101 bytes) in /home/mysite/public_html/modules/jrCore-release-6.0.7/lib/misc.php on line 241 [1]
[07-Aug-2017 20:42:25 Europe/Dublin] PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 9899768 bytes) in /home/mysite/public_html/modules/jrCore-release-6.0.7/lib/misc.php on line 241 [1]
[07-Aug-2017 20:42:58 Europe/Dublin] PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 262100 bytes) in /home/mysite/public_html/modules/jrCore-release-6.0.7/lib/misc.php on line 241 [1]
[07-Aug-2017 20:45:16 Europe/Dublin] PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 262224 bytes) in /home/mysite/public_html/modules/jrCore-release-6.0.7/lib/misc.php on line 241 [1]
[07-Aug-2017 20:46:06 Europe/Dublin] PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 262099 bytes) in /home/mysite/public_html/modules/jrCore-release-6.0.7/lib/misc.php on line 241 [1]

The page in question is http://www.ourtownstory.co.uk/kent - www.ourtownstory.co.uk/dorset or with any other county after the / seem to work fine, and as I said, all use the same template. Using the Inspector shows a very limited amount of html coming in - confess to being a little confused....
iamtimbo
@iamtimbo
08/01/17 10:22:40PM
301 posts

Widgets on SB Index page falling outside page layout


Using Jamroom

Fab - thanks - forgot about the repair ="true" trick. Will give it a bash. Thanks.
iamtimbo
@iamtimbo
08/01/17 04:40:47PM
301 posts

Widgets on SB Index page falling outside page layout


Using Jamroom

Hi, there,

I'm not sure what's happened here (it was whilst I was on iPad and accidentally hit the SiteBuilder button), but the widgets for the right hand column (it was an 8/4 layout) are now appearing below the container they are supposed to be in,and I can't move them out.

Creating a new line for the layout makes things worse, as it has seems to drag in old widget config from goodness only knows where - stuff I haven't used in two years.

I have tried restoring from yesterday's sb backup, but it displays the layout exactly the same. Help!
index.PNG.png index.PNG.png - 86KB

updated by @iamtimbo: 02/16/18 03:18:51PM
iamtimbo
@iamtimbo
07/28/17 10:50:00AM
301 posts

Timeline refers to gallery name, not item


Using Jamroom

Ok...as I suspected, the forum host profile's name isn't pulled over - but I had sort of success using jrCore_list and assign. Dozily, I hadn't clocked that it pulls it through the whole item_list.tpl , but that inadvertently gave me a bonus feature of an unexpected Google map showing the profile location!

That said, I'm still going to try and bring over just the raw text string without a template coming too, as a boatload of a Google maps, however pretty, is going to slow down the load time.....
iamtimbo
@iamtimbo
07/27/17 11:49:55PM
301 posts

Timeline refers to gallery name, not item


Using Jamroom

Poking about won't start until later on, but actually, looking at the datastore, the profile name of the forum containing the post (rather than the title) isn't stored (which is what I'm after), so I'm not sure (yet) that this will work...but like I said I haven't started poking about yet!
iamtimbo
@iamtimbo
07/27/17 11:40:41PM
301 posts

Timeline refers to gallery name, not item


Using Jamroom

My mind was wandering down the list route, too, but backtracked as well!

Thank you for that - that looks like a useful and powerful tool, too, so I shall have the obligatory poke about!
iamtimbo
@iamtimbo
07/27/17 03:15:29PM
301 posts

Timeline refers to gallery name, not item


Using Jamroom

OK. So, following your advice, I have successfully customised a few action templates. All good. In fact, love it.

My next task is to have a forum post's item_action template list the profile name and category in which a forum topic was started. Simple - except that using debug, only the forum_profile_id - a number - pulls through to the item_action.tpl, not its name.
Looking into this, I taught myself a bit about the {assign} function, thinking that I need to define a new var for the template (your 'get it there' above) - but all the values are assigned in the form process, and you can't assign variables on a form (can you?)

So my question is, can a function be used within a template to translate one variable into another? Or would it be useful to bring the profile_name in with the other forum post variables as a matter of course?
updated by @iamtimbo: 07/27/17 03:34:44PM
  4