May 4, 2011

Adding post id to a iamge name when saving it locally | CyberSEO Pro | Support Forum

Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_TopicIcon
Adding post id to a iamge name when saving it locally
Topic Rating: 0 Topic Rating: 0 Topic Rating: 0 Topic Rating: 0 Topic Rating: 0 Topic Rating: 0 (0 votes) 
September 12, 2014
10:13 am
Avatar
allgoodies
Member
Members
Forum Posts: 36
Member Since:
August 28, 2013
sp_UserOfflineSmall Offline

Howdy Admin,

is there any way to add post ID (or some random number) to any image name when saving it locally?

i use this code to scrape/save fhgs from rss Login to see this link

Thank you,

Alex.

September 12, 2014
11:33 am
Avatar
CyberSEO
Admin
Forum Posts: 3635
Member Since:
July 2, 2009
sp_UserOfflineSmall Offline

That’s just impossible because the custom PHP code executes before the post creation. I.e. you can’t get an ID of the post which is not created yet. However, here is no problem to add a random number to the image title. Just alter line #36 like this:

Login to see the code

September 12, 2014
12:07 pm
Avatar
allgoodies
Member
Members
Forum Posts: 36
Member Since:
August 28, 2013
sp_UserOfflineSmall Offline

awesome awesomeness clap

Thank you very much for that!

Forum Timezone: Europe/Amsterdam

Most Users Ever Online: 541

Currently Online:
6 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

ninja321: 84

s.baryshev.aoasp: 64

Freedom: 61

MediFormatica: 49

B8europe: 47

saviulisse67: 45

Member Stats:

Guest Posters: 338

Members: 2602

Moderators: 0

Admins: 1

Forum Stats:

Groups: 1

Forums: 4

Topics: 1518

Posts: 7666

Newest Members:

test.test, david_alija, paypal.orasmarketing, brad.lee.coates, Thatcham Town Radio, drew.jmediagroup

Administrators: CyberSEO: 3635