Skip to content

Forum in maintenance, we will back soon 🙂

Create Free AI Tool...
 
Notifications
Clear all

Create Free AI Tools With WordPress and Gemini in 3 Minutes

79 Posts
17 Users
26 Reactions
1,141 Views
(@husein)
Posts: 409
Member Moderator
 

I just checked your code and it seem you changed the URLs right, now make sure that you have uploaded an image to Wordpress with the same link as the one you wrote in the javascript code.

 
Posted : 04/29/2024 6:53 pm
 bibi
(@habibart)
Posts: 27
Eminent Member
 

@husein Unfortunately all my attempts failed  THIS a sample of what i replace in javascript 

imageContainer.innerHTML = '<img src="https://habibart.com/wp-content/uploads/2024/03/robot.jpg" alt="Error" style="max-width: 100%;">' 

i change all of them with robot.jpg 

is something wrong with my edit please help!

 
Posted : 04/29/2024 9:22 pm
(@husein)
Posts: 409
Member Moderator
 

@habibart do you have an uploaded picture on Wordpress named robot.jpg ?

 
Posted : 04/30/2024 2:04 pm
SSAdvisor
(@ssadvisor)
Posts: 1127
Noble Member
 

@husein well if @habibart does then it isn't in the uploads/2024/03 folder. give a 404 error.

Regards,
Earnie Boyd, CEO
Seasoned Solutions Advisor LLC
Schedule 1-on-1 help
Join me on Slack

 
Posted : 04/30/2024 2:39 pm
(@husein)
Posts: 409
Member Moderator
 

@ssadvisor yes thats what im trying to get to.

 
Posted : 04/30/2024 5:42 pm
 bibi
(@habibart)
Posts: 27
Eminent Member
 

@husein yes i do

 
Posted : 04/30/2024 8:42 pm
 bibi
(@habibart)
Posts: 27
Eminent Member
 

do you think I was supposed to download a GIF instead of a JPG

 
Posted : 04/30/2024 9:16 pm
 bibi
(@habibart)
Posts: 27
Eminent Member
 

I GOT it! thank you guys for the help I switched the image jpg to a gif and it worked

 
Posted : 04/30/2024 9:53 pm
SSAdvisor
(@ssadvisor)
Posts: 1127
Noble Member
 

@habibart it doesn't have to do with GIF versus JPG, the issue was that the robots.jpg file didn't exist. You uploaded another set of files and the folder now moved from 2024/03 to 2024/04. See https://habibart.com/wp-content/uploads/2024/04/ for the list of files.

Regards,
Earnie Boyd, CEO
Seasoned Solutions Advisor LLC
Schedule 1-on-1 help
Join me on Slack

 
Posted : 04/30/2024 11:23 pm
 bibi
(@habibart)
Posts: 27
Eminent Member
 

@ssadvisor in the code there is gif not jpg that's why when I switched to gif it worked.

now I am encountering another error when I try to add a new code snippet where I changed the API key and the prompt but every time I click save this error came up 

Snippet has not been activated due to an error plz help!

Please click the back button in the browser to update the snippet.

View Snippets With Errors 

Error message:

Cannot redeclare setApiKey() (previously declared in /home/www9834/domains/habibart.com/public_html/wp-content/plugins/insert-headers-and-footers/includes/class-wpcode-snippet-execute.php(292) : eval()'d code:3)

 
Posted : 05/01/2024 8:00 am
(@husein)
Posts: 409
Member Moderator
 

@habibart I guess this error is beacuse you have the same function name in different code snippets, try changing its name.

 
Posted : 05/01/2024 11:32 am
SSAdvisor
(@ssadvisor)
Posts: 1127
Noble Member
 

@habibart you must use different function names in the new snippets. Be sure to change the names for where you use the function as well or you will get the result from the original function.

Regards,
Earnie Boyd, CEO
Seasoned Solutions Advisor LLC
Schedule 1-on-1 help
Join me on Slack

 
Posted : 05/01/2024 11:55 am
 bibi
(@habibart)
Posts: 27
Eminent Member
 

@ssadvisor I thought i did countless times but I get the same error 

function setPrompt($input) {
return "Generate 5 catchy blog titles for a blog post about " . $input;

 changed the function to generate 5 catchy YouTube video titles  but still get the same error

am I doing it wrong please help

 
Posted : 05/01/2024 4:11 pm
SSAdvisor
(@ssadvisor)
Posts: 1127
Noble Member
 

@habibart the duplicate function name is setApiKey(). Actually if the results for this one are the same then you can simply remove the def from you new snippet and it will return the same value.

Regards,
Earnie Boyd, CEO
Seasoned Solutions Advisor LLC
Schedule 1-on-1 help
Join me on Slack

 
Posted : 05/01/2024 11:09 pm
(@webideasnetwork)
Posts: 9
Active Member
 

Thanks Hasan, i created my ai blog title generator, modify the prompt a bit here

i can now create many tools i desire in ths line of script. thanks God bless

This post was modified 5 months ago by Ikotun
 
Posted : 05/01/2024 11:40 pm
(@webideasnetwork)
Posts: 9
Active Member
 

pls membership plugin works with mycred that is free to use so i can give my user free credit to test

 
Posted : 05/01/2024 11:43 pm
 bibi
(@habibart)
Posts: 27
Eminent Member
 

@webideasnetwork, please show me an example of what you did to create many tool like copy and paste the parts you changed in the script code thank you

 
Posted : 05/02/2024 7:52 am
 bibi
(@habibart)
Posts: 27
Eminent Member
 

@ssadvisor is this the part I should change when I try to add a new snippet and if yes which part thank you!

$api_key = setApiKey();
$api_url = 'https://generativelanguage.googleapis.com/v1beta/models/gemini-pro:generateContent?key=' . $api_key ;

 
Posted : 05/02/2024 7:57 am
 bibi
(@habibart)
Posts: 27
Eminent Member
 

finally got it!

for all who still encounter the same problem you just need to change all the functions in the code for my case I added the letter G to all the functions function like setApiKey becomes function setGApiKey and do the same with all the functions in the code 

thank you and good luck!!!

 
Posted : 05/02/2024 10:06 am
(@webideasnetwork)
Posts: 9
Active Member
 

@habibart still working on it,

 
Posted : 05/02/2024 1:42 pm
Page 3 / 4
Share:
[the_ad_group id=”312″]