修改wordpress插件位置_wordpress评分插件wp-postratings修改5星投票图标

博主前段时间针对wordpress评分插件wp-postratings这个插件,如何设置5星投票也发布了文章,但是按教程设置成功后,发现投票图标太小,总感觉不完美,由于博主有强迫症,想把他搞好,当然也请教了我会代码的朋友,后来按他的思路,一次一次测试直到搞好为止,测试前当然还是老规矩先备份相应的文件哈,好了下面说说博主按之前的教程成功设置了投票插件后,网站文章出现的两个问题按接下来说的方法都已解决。

问题一:电脑版访问文章可以5星投票,但是手机端访问文章时明明点的是5星投票却出现了4星,这样直接影响用户投票体验度了。

问题二:5星图片图标太小,同样影响用户投票体验度。

091ac2a91e7cca2cc4370162d8a4bef6.png

投票插件星星图片太小(未修改前星星图标太小)

下面是我直接测试成功的解决方法:

1.进入FTP里找到投票插件 wp-content/plugins/wp-postratings/images

找到stars_crystal和stars文件夹(建议先把2个文件下载到本地,设置出了问题也可以恢复)

然后再把1里的所有图片复制,上传到2文件夹里替换覆盖即可。1的图片不需要修改哦。

95c43458deebea3fe2235f922737ea4d.png

复制stars_crystal所有图片后,上传到stars里替换,stars_crystal里的图片不用修改哦

stars_crystal里所有图片尺寸为16剩16,因为stars里图片尺寸为12剩12,我们最终的目的就是把stars12的图片变成stars_crystal16的图片即可。

96a4b91159abd32cf219e86327335100.png

把1里所有图片替换到2里覆盖即可

下面是替换后刷新文章,后的投票星星效果图。明显高大上档次了。

3cb8075b41ef8cdc27ed84080458c95f.png

修改后投票星星图标效果图

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
android调用camera时,可以自己写一个activity,赋上相关参数,打开前camera就可以了; 需要申请的permission,在AndroidManifest.xml中添加: 主要功能,打开前camera private Camera openFrontFacingCameraGingerbread() { int cameraCount = 0; Camera cam = null; Camera.CameraInfo cameraInfo = new Camera.CameraInfo(); cameraCount = Camera.getNumberOfCameras(); for (int camIdx = 0; camIdx < cameraCount; camIdx++) { Camera.getCameraInfo(camIdx, cameraInfo); if (cameraInfo.facing == Camera.CameraInfo.CAMERA_FACING_FRONT) { try { cam = Camera.open(camIdx); mCurrentCamIndex = camIdx; } catch (RuntimeException e) { Log.e(TAG, "Camera failed to open: " + e.getLocalizedMessage()); } } } return cam; } 根据打开时的横竖屏方向来调整preview角度 //根据横竖屏自动调节preview方向,Starting from API level 14, this method can be called when preview is active. private static void setCameraDisplayOrientation(Activity activity,int cameraId, Camera camera) { Camera.CameraInfo info = new Camera.CameraInfo(); Camera.getCameraInfo(cameraId, info); int rotation = activity.getWindowManager().getDefaultDisplay().getRotation(); //degrees the angle that the picture will be rotated clockwise. Valid values are 0, 90, 180, and 270. //The starting position is 0 (landscape). int degrees = 0; switch (rotation) { case Surface.ROTATION_0: degrees = 0; break; case Surface.ROTATION_90: degrees = 90; break; case Surface.ROTATION_180: degrees = 180; break; case Surface.ROTATION_270: degrees = 270; break; } int result; if (info.facing == Camera.CameraInfo.CAMERA_FACING_FRONT) { result = (info.orientation + degrees) % 360; result = (360 - result) % 360; // compensate the mirror } else { // back-facing result = (info.orientation - degrees + 360) % 360; } camera.setDisplayOrientation(result); }

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值