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] My Photos on forum issue

10 Posts
3 Users
0 Reactions
1,070 Views
Posts: 91
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
(@selinahub)
Estimable Member
Joined: 4 years ago
[#22750]

so when ı click photo ıt showıng up wıthout leavıng the site but on my sıte 

ıts goes to 

 

WHY IS THAT BECAUSE OF THE PLUGGING OR WHAT?


9 Replies
dimalifragis
Posts: 2600
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
(@dimalifragis)
Famed Member
Joined: 6 years ago

For ONE photo you need to add this to your theme's functions or with some other code snippet Wordpress plugin:

add_filter('wpforo_content_after', function( $content ){
	return preg_replace_callback(
        '#<a[^><]*\sclass=[\'\"](?\s[^\'\"]*)?[\'\"][^><]*\shref=[\'\"]([^\"\']+)[\'\"][^><]*>.*?</a>#isu',
        function( $match ){
                $html     = $match[0];
	        $file     = $match[1];
	        $pathinfo = pathinfo( $file );
	        if( wpforo_is_image($pathinfo['extension']) ) {
                $html = sprintf(
                    '<a href="%1$s" target="_blank"><img class="wpforo-default-image-attachment" src="%1$s" alt="%2$s" title="%2$s"></a>',
	                esc_url($file),
	                esc_attr($pathinfo['basename'])
                );
	        }
            return $html;
        },
        $content
    );
}, 11);

 

The above will embed the image in the body of post.

To open as a popup use ARI Soft

https://wordpress.org/plugins/ari-fancy-lightbox/

it is (imho) the best option.

For more than one photos and attachments in each post, you need to buy Advanced attachments plugin, from gvectors.

 

 


3 Replies
(@selinahub)
Joined: 4 years ago

Estimable Member
Posts: 91
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

@dimalifragis ı have added the code into thems function  but ıt dıdnt work everytıng went blank unfortunatly:(

 Ekran goruntusu 2022 07 23 004745

dimalifragis
(@dimalifragis)
Joined: 6 years ago

Famed Member
Posts: 2600
dimalifragis
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: @selinahub

@dimalifragis ı have added the code into thems function  but ıt dıdnt work everytıng went blank unfortunatly:(

Ekran goruntusu 2022 07 23 004745

Works very well, if you got a blank page that means you didn't add it correctly.

Use a plugin for that if you want:

https://wordpress.org/plugins/code-snippets/

 


(@selinahub)
Joined: 4 years ago

Estimable Member
Posts: 91
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

@dimalifragis But at least the app is worked its not ı wanted but ıts okey:)

thnk you for the help

 


dimalifragis
Posts: 2600
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
(@dimalifragis)
Famed Member
Joined: 6 years ago

@robert isn't time to make "script" into wpforo plugin? What do yo think?


4 Replies
Robert
Admin
(@robert)
Joined: 2 months ago

Support Team
Posts: 10736
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

@dimalifragis ,

The correct topic and the correct script is this, please always use codes from correct sources: https://wpforo.com/community/how-to-and-troubleshooting-2/uploading-and-embedding-images/#post-5212

And this code is used to show images in a topic not to open it as lightbox. if you want to open an image in lightbox you should use some lightbox plugin. We use Simple Lightbox plugin with


dimalifragis
(@dimalifragis)
Joined: 6 years ago

Famed Member
Posts: 2600
dimalifragis
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: @robert

@dimalifragis ,

The correct topic and the correct script is this, please always use codes from correct sources: https://wpforo.com/community/how-to-and-troubleshooting-2/uploading-and-embedding-images/#post-5212

And this code is used to show images in a topic not to open it as lightbox. if you want to open an image in lightbox you should use some lightbox plugin. We use Simple Lightbox plugin with

https://wpforo.com/community/how-to-and-troubleshooting-2/images-inline/#post-58901

Not sure why this hostile and irrelevent reply from you.

 

 


Robert
Admin
(@robert)
Joined: 2 months ago

Support Team
Posts: 10736
Robert
dimalifragis
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

@dimalifragis,

This is not my reply.

I'll ask @chris to remove it. he has provided an old code.


dimalifragis
(@dimalifragis)
Joined: 6 years ago

Famed Member
Posts: 2600
dimalifragis
Robert
dimalifragis
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: @robert

@dimalifragis,

This is not my reply.

I'll ask @chris to remove it. he has provided an old code.

Remove the code that works and put back the code that doesn't !

Ok, no problem.

 


Share: