This is what I was trying before:
{{ link('newbattle/cpanel/r/save', {'r': $receiver_user_id}, $newbattle)}}
but I was getting errors about $newbattle at the end.
So now:
{{ link('newbattle/cpanel/r/save', {'r': $receiver_user_id})}}
works great.
Thanks.
Just standard like this:
cpanel/r/:int<r>/
In my controller:
public function getParamUserId(ParameterBag $params) {
$params_user_id = $params->r;
return $params_user_id;
}
Then I call $this->getParamUserId($params) where needed in my other methods.
I have my form action:
<xf:form action="{{ link('newbattle/cpanel/save', $newbattle) }}" upload="true" ajax="true" class="block">
My url is like this: newbattle/cpanel/r/24496/add. Since the form is linking to newbattle/cpanel/save it's not working. How should the link be formatted since I...
I dumped the alert page but it wasn't even showing the content_type, so it's confusing. I'm going to work with the user content_type since it seems to work no problem.
I just tested it again by changing the content_type to 'user' and the action to 'newbattle', then named my template alert_user_newbattle and now I see the alert.
Why is that? Why would my content_type not work?
I even copied the exact code from XF\Alert\User and changed the class to NewBattle...
Sorry, I forgot to mention that I looked in AbstractHandler and I have my template as alert_newbattle_battle but it doesn't seem to work still. The content_type and action are inserted correctly.
My alert code is sending an alert to the appropriate user and it shows up with a "1" in the alert notification, but the alert is not showing anything. And when I go to the Alert page it doesn't show anything either. I'm assuming it's because the alert template is not named properly.
Here is my...
I'm having an issue with a template where I'm getting the date from my table's date column (stored in unixtime). I'm display the date like this: 2024/0113/ so January 13, for example.
The problem is that users that are not in same time zone don't show the proper date. Is this because Xenforo is...
I've been searching but I don't see anything about strpos. What would be the equivalent in a template?
Basically, I want to do this:
<xf:if is="strpos({$xf.uri}, 'forums') !== false">
forums
<xf:else />
{$xf.uri}
</xf:if>
because I just need to see if the URL contains certain words...
I thought I had it fixed by using <xf:js> tags instead of <script> tags but the issue is still there.
I noticed in the overlay that it's ignoring the javascript files but it's loading an external css file that I'm using.
Why would the overlay be ignoring those files?
I have an issue with an overlay where I'm not able to load an external file into it.
For example I have a template called "store" and I link to another template called "store-view" with data-xf-click="overlay". The "store-view" template loads but I have a .js file that I want to load into the...