Recent content by Bespoke

  1. Bespoke

    XF 2.2 Birthday?

    Have you taken a look at the User Finder function isBirthday() which the Birthdays widget and MemberStat uses?
  2. Bespoke

    [OzzModz] Sequential Stickies

    It is happening on stickies ordered larger than position 10 because I used strcmp on integers for some reason in function fetchSequencesByIds You'll have to change that function to: public function fetchSequencesByIds(array $ids) { if (!$ids) { return...
  3. Bespoke

    XF 2.2 count attachment

    SELECT SUM(attach_count) FROM xf_rm_resource_update Or count attachments directly from the attachments table by type. But you'll want to cache the results - so you are better off modifying the getForumStatisticsCacheData function in class Repository\Counters as that saves the values in the...
  4. Bespoke

    XF 2.2 count attachment

    Attachments are recorded in a separate table. See xf_attachment xf_attachment_data xf_attachment_view Edit: Looks like the resource_update table keeps track of attachment count
  5. Bespoke

    XF 2.2 Is there a similar variable

    The question is where and how often. Seems like you want to fetch the info often so you'll either have to write your own code to keep track of the count or use Lawrence's add-on as Ozzy47 suggested.
  6. Bespoke

    XF 2.2 Is there a similar variable

    Depending on where you want to fetch this info, you should be able to use: $this->repository('XF:Thread')->findThreadsStartedByUser($user.user_id)->total(); If you plan to use it a lot then you'll have to cache it, otherwise above mentioned add-on looks good.
  7. Bespoke

    XF 2.1 Is there a way to get thread ID from URL?

    See function getThreadFromUrl() in file Repository\Thread.php It return a thread, if found, but you could create a similar function to return just the thread_id using the same code.
  8. Bespoke

    XF 2.1 How to identify the last item of an array in a template foreach loop

    Thank you for sharing. It is always nice to see how things are done and helps when searching these forums for answers. Another way to convert the array to a comma separated string would be {{ $array|join(', ') }}
  9. Bespoke

    XF 2.1 how to hide the Attach files button on Post thread page but retain its function (which is also used by Drop image)?

    Try style="display:none" upload_link is the first section of the template where you are making the changes.
  10. Bespoke

    XF 2.1 Help with BB code in Polls

    The answer was provided in the thread you linked. Try something like {{ bb_code($response.response, 'poll', $poll) }} in bothe the Vote macro and the Result macro However, you will probably have to also make some chages to the CSS class .pollResult-response as the fa-var-check-circle icon is not...
  11. Bespoke

    Featured content above forum nods?

    Have you tried the Notices system to see if its placement suites your needs? Otherwise you would need to create an add-on or at least a template modification to insert your text/image exactly where you want it. Edit: If its an add-on you're looking for then more information as to where and what...
  12. Bespoke

    XF 2.1 how to hide the Attach files button on Post thread page but retain its function (which is also used by Drop image)?

    You could hide the button by creating a template modification for template helper_attach_upload, macro upload_link If you only want to remove it for thread posts and not conversations then you can include a if/else statement that checks for $type == 'post' Then add style="visibility:hidden" to...
  13. Bespoke

    XF 2.1 How can I re-positioning the custom thread fields

    I'm not the best person to answer your question but since no one else is, I'll try. It seems that you need to make the dt element smaller. I would create a new class (fixedTiny) in extra.less and then modify custom_fields_macros to call it. .pairs.pairs--columns.pairs--fixedTiny { > dt...
  14. Bespoke

    XF 2.1 Which template to edit?

    The template you are looking for is quick_reply_macros, however it is used for both conversations and threads and so you will have to place your desired text within an if/else statement in order to limit it to conversations only. Try something like: <xf:if is="$multiQuoteStorageKey ==...
Top Bottom