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: 3913
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:
12 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

ninja321: 84

s.baryshev.aoasp: 68

Freedom: 61

Pandermos: 54

MediFormatica: 49

B8europe: 48

Member Stats:

Guest Posters: 337

Members: 2818

Moderators: 0

Admins: 1

Forum Stats:

Groups: 1

Forums: 5

Topics: 1627

Posts: 8280

Newest Members:

bkc.tessier, igor.buzaev, jeremyboucher, lthompson2709, MAC, duty3canada

Administrators: CyberSEO: 3913