AI Search
Classic Search
 Search Phrase:
 Search Type:
Advanced search options
 Search in Forums:
 Search in date period:

 Sort Search Results by:

AI Assistant
Notifications
Clear all

Small preview of the tipic widget

5 Posts
2 Users
3 Reactions
1,066 Views
xfok
Posts: 86
 xfok
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@xfok)
Estimable Member
Joined: 7 years ago
[#56908]

I would like to add a small preview of the tipic in the Recent Topics widget as it is already present for the Recent Posts widget.
Is it possible to do this? Any suggestions on a custom code?


4 Replies
Tutrix
Posts: 1519
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@tutrix)
Noble Member
Joined: 6 years ago

Hi @xfok 

Posted by: @xfok

Any suggestions on a custom code?

try

<p class="posttext"><span><?php $first_post_body = wpforo_post($topic['first_postid'], 'body');  wpforo_text($first_post_body, 150);  ?></span></p>

Replace 150 with the value you want to display.

 


Reply
1 Reply
xfok
 xfok
(@xfok)
Joined: 7 years ago

Estimable Member
Posts: 86
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian

Posted by: @tutrix

Hi @xfok 

Posted by: @xfok

Any suggestions on a custom code?

try

<p class="posttext"><span><?php $first_post_body = wpforo_post($topic['first_postid'], 'body');  wpforo_text($first_post_body, 150);  ?></span></p>

Replace 150 with the value you want to display.

 

 

@tutrix thank you very much. Is this code also able to return advanced attachments like images?

 


Reply
Tutrix
Posts: 1519
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@tutrix)
Noble Member
Joined: 6 years ago

Posted by: @xfok

Is this code also able to return advanced attachments like images?

I don't have a solution for this yet.

wpforo_text

Displays only text, no HTML, the code can be changed, but attachments will only be displayed as shortcode.

Example

[ attach ]100[/ attach ]

 


Reply
1 Reply
xfok
 xfok
(@xfok)
Joined: 7 years ago

Estimable Member
Posts: 86
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian

Posted by: @tutrix

Posted by: @xfok

Is this code also able to return advanced attachments like images?

I don't have a solution for this yet.

wpforo_text

Displays only text, no HTML, the code can be changed, but attachments will only be displayed as shortcode.

Example

[ attach ]100[/ attach ]

 

Having a forum where many images are posted so it is not a good solution.
Is it difficult to implement a solution that returns the shortcode as an image?

 


Reply
Share: