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

[Closed] wpforo_like_button function and post.php for Extended layout

5 Posts
2 Users
1 Reactions
1,639 Views
Posts: 212
 fawp
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
(@fawp)
Reputable Member
Joined: 7 years ago
[#20104]

I wanted to use the function wpforo_like_button on a custom post template.

I can see that the function works fine in the Threaded layout, but if I use the function on a post template derived from the Extended layout, it does not show the 'like count'.

 

Upon further examination, it seems that the template

/wpf-themes/classic/layouts/1/post.php

is missing the following statement

$post = wpforo_post($post['postid']);

which is present in line 24 of

/wpf-themes/classic/layouts/4/post.php

 

If I add the same statement to the template where it is missing, the wpforo_like_button then works as expected.

Question

By adding that statement it seems that some post array values that weren't loaded now are being loaded.

Was there a specific reason why that statement was missing for the Extended layout?

I would not want to have unforeseen consequences by adding it.

 

Thanks,

fawp

 


4 Replies
Chris
Posts: 3610
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
(@chris)
Famed Member
Joined: 5 years ago

Hi @fawp,

The reason why that statement is missing is that those are different layouts and are developed, updated separate from each other.

 


3 Replies
 fawp
(@fawp)
Joined: 7 years ago

Reputable Member
Posts: 212
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: @chris

Hi @fawp,

The reason why that statement is missing is that those are different layouts and are developed, updated separate from each other.

 

Thanks Chris, my question was, am I likely to encounter problems by adding it?

 


Chris
(@chris)
Joined: 5 years ago

Famed Member
Posts: 3610
Chris
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

@fawp,

I'm sorry, but a cant say that you won't have any issues, as I don't know how the customizations you did will respond on wpForo, It's like on your own risk to make code customizations.


 fawp
(@fawp)
Joined: 7 years ago

Reputable Member
Posts: 212
Chris
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

@chris fair enough. Thanks Chris.


Share: